简体   繁体   中英

ember broccoli foundation-sites

When try to ember build or ember serve I get next error:

The Broccoli Plugin: [SourceMapConcat: Concat: Vendor /assets/vendor.js] failed with:

Error: ENOENT: no such file or directory, stat '/Users/artem_shevtsov/DATA/Projects/laser/ui/tmp/ source_map_concat-input_base_path-TNdPSywn.tmp /bower_components/foundation-sites/dist/foundation.js' at Object.fs.statSync (fs.js:906:18) at FSMonitor._measure (/Users/artem_shevtsov/DATA/Projects/laser/ui/node_modules/heimdalljs-fs-monitor/index.js:66:21) at Object.statSync (/Users/artem_shevtsov/DATA/Projects/laser/ui/node_modules/heimdalljs-fs-monitor/index.js:82:30) at Concat.keyForFile (/Users/artem_shevtsov/DATA/Projects/laser/ui/node_modules/broccoli-caching-writer/index.js:87:20) at Array.map (native) at Concat.CachingWriter._conditionalBuild (/Users/artem_shevtsov/DATA/Projects/laser/ui/node_modules/broccoli-caching-writer/index.js:109:65) at /Users/artem_shevtsov/DATA/Projects/laser/ui/node_modules/broccoli-plugin/read_compat.js:93:34 at tryCatch (/Users/artem_shevtsov/DATA/Projects/laser/ui/node_modules/rsvp/dist/rsvp.js:538:12) at invokeCallback (/Users/artem_shevtsov/DATA/Pro jects/laser/ui/node_modules/rsvp/dist/rsvp.js:553:13) at publish (/Users/artem_shevtsov/DATA/Projects/laser/ui/node_modules/rsvp/dist/rsvp.js:521:7) at flush (/Users/artem_shevtsov/DATA/Projects/laser/ui/node_modules/rsvp/dist/rsvp.js:2373:5) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

I tried npm and bower cache clean, rm -rf tmp node_modules bower_components and plugins reinstallation

Also tried manual installation with npm and bower ( npm i foundation-sites, bower install foundation-sites ) and add

app.import('node_modules/foundation-sites/dist/js/foundation.js')
app.import('node_modules/foundation-sites/dist/js/foundation.min.js')

(or bower_components/... respectively) but it does not work

❯ npm -v
3.10.9

❯ node -v
v7.2.0

❯ ember -v
v7.2.0 ember-cli: 2.9.0 node: 7.2.0 os: darwin x64

  • Remove entry for foundation or foundation-sites from package.json and bower.json.
  • npm cahce clean
  • bower cache clean
  • rm -rf tmp node_modules bower_components
  • npm install && bower install
  • bower install foundation
  • remove other entries related foundation from ember-cli-build.js and include below app.import('bower_components/foundation-sites/dist/js/foundation.min.js')
  • Stop ember server and start it again.

app.import('bower_components/foundation-sites/dist/foundation.min.js', { type: 'vendor' });

type: 'vendor' is the secret of success

path can be different, depends on foundation-sites version

I leave package.json and bower.json without any changes

  1. Set the version of foundation-sites to 6.2.2 in bower.json
  2. run bower install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM