2017-03-29 4 views
0

Mein Webpack richtig auf meine Entwicklungsumgebung kompiliert, aber sobald ich auf Heroku bereitstellen, Ich erhalte eine Fehlermeldung, dass Chart.js ist kein Modul-Webpack kompiliert lokal, aber nicht auf Heroku

remote: -----> npm install --only=dev 
remote: [email protected] /tmp/build_c869c8be2e135052ead9047bc4bb375a 
remote: ├── [email protected] 
remote: ├─┬ [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ └─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ └─┬ [email protected] 
remote: │ └── [email protected] 
remote: ├─┬ [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └─┬ [email protected] 
remote: │ │ │ └─┬ [email protected] 
remote: │ │ │  └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └─┬ [email protected] 
remote: │ │ ├── balanced[email protected] 
remote: │ │ └── [email protected] 
remote: │ └── [email protected] 
remote: ├─┬ [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ └─┬ [email protected] 
remote: │ │ └─┬ [email protected] 
remote: │ │  ├── [email protected] 
remote: │ │  └─┬ [email protected] 
remote: │ │  └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ └── [email protected] 
remote: ├─┬ [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ └─┬ [email protected] 
remote: │ └─┬ [email protected] 
remote: │  └── [email protected] 
remote: ├─┬ [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ └── [email protected] 
remote: │ └── [email protected] 
remote: ├─┬ [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ └─┬ [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ └─┬ [email protected] 
remote: │ │  └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └─┬ [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ ├── [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ ├── [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ ├── [email protected] 
remote: │ │ │ │ ├── [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └─┬ [email protected] 
remote: │ │ │  └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ └─┬ [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ │ └── [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ └── [email protected] 
remote: ├─┬ [email protected] 
remote: │ ├── [email protected] 
remote: │ └── [email protected] 
remote: ├── [email protected] 
remote: ├─┬ [email protected] 
remote: │ └─┬ [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ └── [email protected] 
remote: ├── [email protected] 
remote: ├─┬ [email protected] 
remote: │ └── [email protected] 
remote: ├─┬ [email protected] 
remote: │ └── [email protected] 
remote: ├─┬ [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── constants-browser[email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ └─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ └─┬ [email protected] 
remote: │ │ ├── [email protected] 
remote: │ │ ├─┬ [email protected] 
remote: │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ ├─┬ [email protected] 
remote: │ │ │ │ │ └── [email protected] 
remote: │ │ │ │ └── [email protected] 
remote: │ │ │ ├── [email protected] 
remote: │ │ │ └── [email protected] 
remote: │ │ └── [email protected] 
remote: │ ├─┬ [email protected] 
remote: │ │ └── [email protected] 
remote: │ └─┬ [email protected] 
remote: │ └─┬ [email protected] 
remote: │  └── [email protected] 
remote: └─┬ [email protected] 
remote: └─┬ [email protected] 
remote:  └── [email protected] 
remote: 
remote: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules/chokidar/node_modules/fsevents): 
remote: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 
remote: npm WARN [email protected] No repository field. 
remote: -----> bundle exec rake webpack:compile 
remote: ** Invoke webpack:compile (first_time) 
remote: ** Invoke environment (first_time) 
remote: ** Execute environment 
remote: ** Execute webpack:compile 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/.bin/webpack --config /tmp/build_c869c8be2e135052ead9047bc4bb375a/config/webpack.config.js --bail 
remote: Error 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/webpack/lib/Compilation.js:229:38 
remote:  at onDoneResolving (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/webpack/lib/NormalModuleFactory.js:29:20) 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/webpack/lib/NormalModuleFactory.js:85:20 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/async/lib/async.js:726:13 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/async/lib/async.js:52:16 
remote:  at done (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/async/lib/async.js:241:17) 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/async/lib/async.js:44:16 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/async/lib/async.js:723:17 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/async/lib/async.js:167:37 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:24:19 
remote:  at onResolved (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/Resolver.js:38:18) 
remote:  at innerCallback (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/Resolver.js:94:11) 
remote:  at loggingCallbackWrapper (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/createInnerCallback.js:21:19) 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/tapable/lib/Tapable.js:134:6 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/ModulesInDirectoriesPlugin.js:54:23 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/Resolver.js:191:15 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/ModulesInDirectoriesPlugin.js:45:26 
remote:  at loggingCallbackWrapper (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/createInnerCallback.js:21:19) 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/tapable/lib/Tapable.js:134:6 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/Resolver.js:122:33 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/Resolver.js:191:15 
remote:  at applyPluginsParallelBailResult.createInnerCallback.log (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/Resolver.js:110:4) 
remote:  at loggingCallbackWrapper (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/createInnerCallback.js:21:19) 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/tapable/lib/Tapable.js:134:6 
remote:  at Resolver.<anonymous> (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/FileAppendPlugin.js:31:26) 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/Resolver.js:191:15 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/FileAppendPlugin.js:28:12 
remote:  at Storage.finished (/tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16) 
remote:  at /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/graceful-fs/polyfills.js:284:29 
remote:  at FSReqWrap.oncomplete (fs.js:114:15) 
remote: resolve module Chart.js in /tmp/build_c869c8be2e135052ead9047bc4bb375a/webpack/js/ui_components/datavisuals 
remote: looking for modules in /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules 
remote:  /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/Chart.js doesn't exist (module as directory) 
remote:  resolve 'file' Chart.js in /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules 
remote:  resolve file 
remote:   /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/Chart.js doesn't exist 
remote:   /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/Chart.js.js doesn't exist 
remote:   /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/Chart.js.jsx doesn't exist 
remote:   /tmp/build_c869c8be2e135052ead9047bc4bb375a/node_modules/Chart.js.css doesn't exist 
remote: rake aborted! 
remote: Command failed with status (1): [/tmp/build_c869c8be2e135052ead9047bc4bb375...] 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/file_utils.rb:66:in `block in create_shell_runner' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/file_utils.rb:56:in `call' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/file_utils.rb:56:in `sh' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/webpack-rails-0.9.9/lib/tasks/webpack.rake:17:in `block (2 levels) in <top (required)>' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `call' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/bin/rake:23:in `load' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/bin/rake:23:in `<top (required)>' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:74:in `load' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:74:in `kernel_load' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/cli/exec.rb:27:in `run' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/cli.rb:335:in `exec' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/cli.rb:20:in `dispatch' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/cli.rb:11:in `start' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/exe/bundle:32:in `block in <top (required)>' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/ruby-2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.6/exe/bundle:24:in `<top (required)>' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/bin/bundle:22:in `load' 
remote: /tmp/build_c869c8be2e135052ead9047bc4bb375a/vendor/bundle/ruby/2.2.0/bin/bundle:22:in `<main>' 
remote: Tasks: TOP => webpack:compile 
remote: !  Push rejected, failed to compile webpack-rails app. 
remote: 
remote: !  Push failed 

Meine Webpack-Konfigurationsdatei sieht so aus: // 'use strict';

var path = require('path'); 
var webpack = require('webpack'); 
var StatsPlugin = require('stats-webpack-plugin'); 
var ExtractTextPlugin = require("extract-text-webpack-plugin"); 

// must match config.webpack.dev_server.port 
var devServerPort = 3808; 

// set NODE_ENV=production on the environment to add asset fingerprints 
var production = process.env.NODE_ENV === 'production'; 

var config = { 
    entry: { 
    // Sources are expected to live in $app_root/webpack 
    application: [ 
     './webpack/js/application.js', 
     './webpack/stylesheets/application.scss' 
    ], 
    //'instcolors': './webpack/InstColors' 
    /* 
    dashboard: [ 
     './webpack/js/index', // entry point of our app. assets/js/index.js should require other js modules and dependencies it needs 
     './webpack/stylesheets/main.css' 
    ], 
    ic_contact: './webpack/js/ic_contact', // entry point of our app. assets/js/index.js should require other js modules and dependencies it needs 
    projects: [ 
     './webpack/js/ProjectList', // entry point of our app. assets/js/index.js should require other js modules and dependencies it needs 
     './webpack/stylesheets/main.css' 
    ] 
    */ 
    }, 

    output: { 
    // Build assets directly in to public/webpack/, let webpack know 
    // that all webpacked assets start with webpack/ 

    // must match config.webpack.output_dir 
    path: path.join(__dirname, '..', 'public', 'webpack'), 
    publicPath: '/webpack/', 

    filename: production ? '[name]-[chunkhash].js' : '[name].js' 
    }, 

    resolve: { 
    root: path.join(__dirname, '..', 'webpack') 
    }, 

    plugins: [ 
    new webpack.DefinePlugin({ 
     'process.env': { 
     // This has effect on the react lib size 
     'NODE_ENV': JSON.stringify('development'), 
     } 
    }), 
    // must match config.webpack.manifest_filename 
    new StatsPlugin('manifest.json', { 
     // We only need assetsByChunkName 
     chunkModules: false, 
     source: false, 
     chunks: false, 
     modules: false, 
     assets: true 
    }), 
    new ExtractTextPlugin('./webpack/stylesheets/[name].css'), 
    new webpack.optimize.CommonsChunkPlugin(/* chunkName= */"vendor", /* filename= */"vendor.bundle.js") 
    ], 
    module: { 
    loaders: [ 
     // to transform JSX into JS 
     { 
     test: /\.jsx?$/, 
     exclude: /node_modules/, 
     loader: 'babel', 
     query: { 
      presets: ['react'] 
     } 
     }, 
     // Extract css files 
     { 
      test: /\.css$/, 
      loader: ExtractTextPlugin.extract("style-loader", "css-loader") 
     }, 

    ], 
    }, 

    resolve: { 
    modulesDirectories: ['node_modules', 'bower_components'], 
    extensions: ['', '.js', '.jsx', '.css', '.scss'] 
    }, 

}; 

if (production) { 
    config.plugins.push(
    new webpack.NoErrorsPlugin(), 
    new webpack.optimize.UglifyJsPlugin({ 
     minimize: false, 
     compressor: { warnings: false }, 
     sourceMap: false 
    }), 
    new webpack.DefinePlugin({ 
     'process.env': { NODE_ENV: JSON.stringify('production') } 
    }), 
    new webpack.optimize.DedupePlugin(), 
    new webpack.optimize.OccurenceOrderPlugin() 
); 
} else { 
    config.devServer = { 
    port: devServerPort, 
    headers: { 'Access-Control-Allow-Origin': '*' } 
    }; 
    config.output.publicPath = '//localhost:' + devServerPort + '/webpack/'; 
    // Source maps 
    config.devtool = 'cheap-module-eval-source-map'; 
} 

module.exports = config; 

und meine package.json-

{ 
    "name": "webpack-rails-example", 
    "version": "0.0.1", 
    "license": "MIT", 
    "devDependencies": { 
    "babel": "^6.5.2", 
    "babel-cli": "^6.18.0", 
    "babel-core": "^6.18.2", 
    "babel-loader": "^6.2.9", 
    "babel-preset-react": "^6.16.0" 
    }, 
    "dependencies": { 
    "react-bootstrap": "^0.30.7", 
    "stats-webpack-plugin": "^0.2.1", 
    "react-router": "^2.0.0", 
    "webpack-dev-server": "^1.9.0", 
    "chart.js": "^2.4.0", 
    "css-loader": "^0.26.1", 
    "extract-text-webpack-plugin": "^1.0.1", 
    "jquery": "*", 
    "react": "^15.4.1", 
    "react-dom": "^15.4.1", 
    "react-router": "^2.0.0", 
    "react-search-input": "^0.10.3", 
    "style-loader": "^0.13.1", 
    "webpack": "^1.14.0", 
    "webpack-bundle-tracker": "^0.1.0" 
    }, 
    "scripts": { 
    "start": "webpack-dev-server --config config/webpack.config.js" 
    } 
} 

Soweit ich das beurteilen kann, scheint es, dass das NPM-Paket installiert wird, also warum kann das Modul nicht gefunden werden? Ich bin ziemlich neu in React (ich bin der Backend-Entwickler bei diesem Projekt), jede Hilfe wird geschätzt.

Antwort

0

Aus der ersten Zeile in Ihrem Protokoll: npm install --only=dev sieht es aus wie Sie sind nur ziehen devDependencies. chart.js ist in dependencies registriert, so dass --only=devchart.js nicht herunterladen wird.

Um über den --only Schalter zu lesen, here is the documentation.

Ich würde vorschlagen, dass Sie die --only Flagge aus dem npm install wenn möglich entfernen.

Verwandte Themen