Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Using foundation-explicit-pieces.js will not compile #1363

Open
jonbrockett opened this issue Feb 27, 2019 · 4 comments
Open

Using foundation-explicit-pieces.js will not compile #1363

jonbrockett opened this issue Feb 27, 2019 · 4 comments
Labels
bug build error Error with the build process

Comments

@jonbrockett
Copy link

jonbrockett commented Feb 27, 2019

How can this bug be reproduced?

  1. Install a fresh copy of FoundationPress
  2. Run npm install
  3. Edit src/assets/js/app.js
  4. Follow comment to enable ./lib/foundation-explicit-pieces
  5. Run, npm start or npm run build

What did you expect to happen?
It should compile normally.

What happened instead?
An error loading the foundation-explicit-pieces listed below:

foundationpress@2.10.5 build /Users/web3/Downloads/FoundationPress-master
gulp build --production

[10:32:14] Failed to load external module @babel/register
[10:32:14] Requiring external module babel-register
[10:32:16] Loading config file...
[10:32:16] config.yml does not exist, loading config-default.yml
[10:32:16] Using gulpfile ~/Downloads/FoundationPress-master/gulpfile.babel.js
[10:32:16] Starting 'build'...
[10:32:16] Starting 'clean'...
[10:32:16] Finished 'clean' after 38 ms
[10:32:16] Starting 'sass'...
[10:32:16] Starting 'webpack:build'...

[10:32:16] Starting 'images'...
[10:32:16] Starting 'copy'...
[10:32:16] Finished 'copy' after 737 ms
DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal
in Sass 4.0. Use call(get-function("shake")) instead.

DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal
in Sass 4.0. Use call(get-function("shake")) instead.

DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal
in Sass 4.0. Use call(get-function("spin")) instead.

DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal
in Sass 4.0. Use call(get-function("spin")) instead.

DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal
in Sass 4.0. Use call(get-function("wiggle")) instead.

DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal
in Sass 4.0. Use call(get-function("wiggle")) instead.

[10:32:19] Finished 'sass' after 3.84 s
[10:32:20] gulp-imagemin: Minified 6 images (saved 55 kB - 27.7%)
[10:32:21] Finished 'images' after 5.8 s
[10:32:22] 'webpack:build' errored after 6.77 s
[10:32:22] Error in plugin 'webpack-stream'
Message:
./src/assets/js/lib/foundation-explicit-pieces.js
Module not found: Error: Can't resolve 'foundation-sites/js/foundation.util.core' in
'/Users/web3/Downloads/FoundationPress-master/src/assets/js/lib'
resolve 'foundation-sites/js/foundation.util.core' in '/Users/web3/Downloads/Foundat
ionPress-master/src/assets/js/lib'
Parsed request is a module
using description file: /Users/web3/Downloads/FoundationPress-master/package.json
(relative path: ./src/assets/js/lib)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Users/web3/Downloads/FoundationPress-master/package
.json (relative path: ./src/assets/js/lib)

resolve as module
  /Users/web3/Downloads/FoundationPress-master/src/assets/js/lib/node_modules do

esn't exist or is not a directory
/Users/web3/Downloads/FoundationPress-master/src/assets/js/node_modules doesn'
t exist or is not a directory
/Users/web3/Downloads/FoundationPress-master/src/assets/node_modules doesn't e
xist or is not a directory
/Users/web3/Downloads/FoundationPress-master/src/node_modules doesn't exist or
is not a directory
/Users/web3/Downloads/node_modules doesn't exist or is not a directory
/Users/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /Users/web3/Downloads/FoundationPress-master/node_modul
es
using description file: /Users/web3/Downloads/FoundationPress-master/package
.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Users/web3/Downloads/FoundationPress-master/p
ackage.json (relative path: ./node_modules)
using description file: /Users/web3/Downloads/FoundationPress-master/node_
modules/foundation-sites/package.json (relative path: ./js/foundation.util.core)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/web3/Downloads/FoundationPress-master/node_modules/foundation-s
ites/js/foundation.util.core doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/web3/Downloads/FoundationPress-master/node_modules/foundation-s
ites/js/foundation.util.core.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Users/web3/Downloads/FoundationPress-master/node_modules/foundation-s
ites/js/foundation.util.core.json doesn't exist
as directory
/Users/web3/Downloads/FoundationPress-master/node_modules/foundation-s
ites/js/foundation.util.core doesn't exist
looking for modules in /Users/web3/node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
No description file found
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/web3/node_modules/foundation-sites/js/foundation.util.core doesn't
exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/web3/node_modules/foundation-sites/js/foundation.util.core.js doesn
't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Users/web3/node_modules/foundation-sites/js/foundation.util.core.json doe
sn't exist
as directory
/Users/web3/node_modules/foundation-sites/js/foundation.util.core doesn't
exist
[/Users/web3/Downloads/FoundationPress-master/src/assets/js/lib/node_modules]
[/Users/web3/Downloads/FoundationPress-master/src/assets/js/node_modules]
[/Users/web3/Downloads/FoundationPress-master/src/assets/node_modules]
[/Users/web3/Downloads/FoundationPress-master/src/node_modules]
[/Users/web3/Downloads/node_modules]
[/Users/node_modules]
[/node_modules]
[/Users/web3/node_modules/package.json]
[/Users/web3/Downloads/FoundationPress-master/node_modules/foundation-sites/js/found
ation.util.core]
[/Users/web3/Downloads/FoundationPress-master/node_modules/foundation-sites/js/found
ation.util.core.js]
[/Users/web3/Downloads/FoundationPress-master/node_modules/foundation-sites/js/found
ation.util.core.json]
[/Users/web3/node_modules/foundation-sites/js/foundation.util.core/package.json]
[/Users/web3/Downloads/FoundationPress-master/node_modules/foundation-sites/js/found
ation.util.core]
[/Users/web3/node_modules/foundation-sites/js/foundation.util.core]
[/Users/web3/node_modules/foundation-sites/js/foundation.util.core.js]
[/Users/web3/node_modules/foundation-sites/js/foundation.util.core.json]
[/Users/web3/node_modules/foundation-sites/js/foundation.util.core]
@ ./src/assets/js/lib/foundation-explicit-pieces.js 9:22-73
@ ./src/assets/js/app.js
@ multi ./src/assets/js/app.js
Details:
domain: [object Object]
domainThrown: true
[10:32:22] 'build' errored after 6.81 s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! foundationpress@2.10.5 build: gulp build --production
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the foundationpress@2.10.5 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging
output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/web3/.npm/_logs/2019-02-27T15_32_22_901Z-debug.log

Please List the Following:

  • OS & version: macOS Mojave v10.14.3
  • Node version (node -v) [Node v4+ is required] : v11.10.0
  • FoundationPress version (see line 3 in package.json): v2.10.5
  • Foundation version (found in node_modules/foundation-sites/package.json) : v6.5.1

Include Test Case (if applicable):

@derweili derweili added bug build error Error with the build process labels Feb 28, 2019
@derweili
Copy link
Collaborator

This looks like an error with the latest Foundation Version.
Switching back to the last commit before updating to 6.5.1 solves this issue. 8fde285

@jonbrockett
Copy link
Author

Great! This allowed me to compile.

@emaia
Copy link
Contributor

emaia commented Apr 3, 2019

Hi!

In foundation-explicit-pieces.js, on line 3, the filename is incorrect.
"/Users/web3/node_modules/foundation-sites/js/foundation.util.core doesn't exist"

The correct file name is "foundation.core.utils"

Also, there is a warning message

DEPRECATION WARNING: Passing a string to call() is deprecated and will be illegal in Sass 4.0. Use call(get-function("shake")) instead.

Update motion-ui to the latest version 2.0.3 or remove it to fix this warning.

@AdamChlan
Copy link
Contributor

Seems like this one was resolved here:

d571f53

Thinking it can be closed out?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug build error Error with the build process
Projects
None yet
Development

No branches or pull requests

4 participants