FoundationPress icon indicating copy to clipboard operation
FoundationPress copied to clipboard

Using foundation-explicit-pieces.js will not compile

Open jonbrockett opened this issue 5 years ago • 4 comments

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:

[email protected] 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! [email protected] build: gulp build --production npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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):

jonbrockett avatar Feb 27 '19 15:02 jonbrockett

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. https://github.com/olefredrik/FoundationPress/commit/8fde2859fbffefc64bcc20a0bb4d89d3111d509a

derweili avatar Feb 28 '19 15:02 derweili

Great! This allowed me to compile.

jonbrockett avatar Feb 28 '19 16:02 jonbrockett

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.

emaia avatar Apr 03 '19 15:04 emaia

Seems like this one was resolved here:

https://github.com/olefredrik/FoundationPress/commit/d571f53b1ad4848bf4981fb9fbdea3bf78293934

Thinking it can be closed out?

AdamChlan avatar Aug 02 '19 01:08 AdamChlan