Closed hophacker closed 8 years ago
Could you please post your npm-debug.log
? Will try to repro, but difficult to tell right off the bat.
I haven't been able to reproduce this, do you have any additional information about this error?
Sorry for my late replay, it is here: npm-debug.txt
Exactly the same error on my side.
@Donovan-Ensicaen The most weird thing to me is that this is a transitional issue. It never happened in my desktop, but it bothers me on the server side SOMETIMES, all with the same code base, running the same command, which is npm run deploy
@hophacker I use npm run deploy
on local and I always have the error. I can't figure out the issue.
Ok it works on my side, I can run npm run deploy
. Be careful to remove all compiling errors as indentation, semicolons etc. Even if it compile, I'm not able to deploy it on heroku...
Having the same issue here. Not able to deploy on heroku.
It seems that you need to clear all the errors output showing on "npm run dev" to ensure it works in production mode. But I think it's unnecessary since some errors generated by flow are "wrong" errors.
On Mon, Feb 29, 2016 at 1:33 PM, Tony Tai Nguyen notifications@github.com wrote:
Having the same issue here. Not able to deploy on heroku.
— Reply to this email directly or view it on GitHub https://github.com/davezuko/react-redux-starter-kit/issues/571#issuecomment-190052885 .
冯杰 排忧网络技术有限责任公司 苏州工业园区星湖街328号创意产业园
Cell: 86-15862355582 Linkedin: https://www.linkedin.com/pub/jie-feng/7a/a2a/194
Prev: Comprehend Systems, 2010 Broadway #200, Redwood City, CA 94063 Education: The Johns Hopkins University, Master of Science
I might try deploying it myself to heroku today to see if I can repro.
Thanks @davezuko. I tried to just git pull / build / deploy and it was not working on my side.
I have the same issue when I try to deploy on heroku or a private VPS server on CentOS. Locally (OSX El Capitan) both npm run compile
and NODE_ENV=production npm run compile
runs and finishes successfully.
Same npm ERR! code ELIFECYCLE
error pointing to at EventEmitter.<anonymous> (... /node_modules/npm/lib/utils/lifecycle.js:232:16)
. Looks very similar to #350, but I'm sure I have the latest node (5.7.0) and npm (3.7.5) and npm cache clear
doesn't help.
Here is the excerpt from my npm-debug.log
:
[429] ./~/redux-form/lib/events/isEvent.js 237 bytes {1} [built]
[430] ./~/redux-form/lib/events/silenceEvent.js 453 bytes {1} [built]
[431] ./~/redux-form/lib/getDisplayName.js 206 bytes {1} [built]
[432] ./~/redux-form/lib/getValues.js 1.62 kB {1} [built]
[433] ./~/redux-form/lib/getValuesFromState.js 1.15 kB {1
npm verb lifecycle my-app@0.1.0~compile: unsafe-perm in lifecycle true
npm verb lifecycle my-app@0.1.0~compile: PATH: /tmp/build_81c895bc33520498d87f9abc614abd7c/.heroku/node/lib/node_modules/npm/bin/node-gyp-bin:/tmp/build_81c895bc33520498d87f9abc614abd7c/node_modules/.bin:/tmp/build_81c895bc33520498d87f9abc614abd7c/.heroku/node/bin:/tmp/build_81c895bc33520498d87f9abc614abd7c/.heroku/node/lib/node_modules/npm/bin/node-gyp-bin:/tmp/build_81c895bc33520498d87f9abc614abd7c/node_modules/.bin:/tmp/build_81c895bc33520498d87f9abc614abd7c/.heroku/node/bin:/tmp/build_81c895bc33520498d87f9abc614abd7c/.heroku/node/bin:/app/bin:/app/vendor/bundle/bin:/app/vendor/bundle/ruby/2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/tmp/codon/vendor/bin
npm verb lifecycle my-app@0.1.0~compile: CWD: /tmp/build_81c895bc33520498d87f9abc614abd7c
npm info lifecycle my-app@0.1.0~compile: Failed to exec compile script
npm verb stack Error: my-app@0.1.0 compile: `better-npm-run compile`
npm verb stack Exit status 1
npm verb stack at EventEmitter.<anonymous> (/tmp/build_81c895bc33520498d87f9abc614abd7c/.heroku/node/lib/node_modules/npm/lib/utils/lifecycle.js:239:16)
npm verb stack at emitTwo (events.js:100:13)
npm verb stack at EventEmitter.emit (events.js:185:7)
npm verb stack at ChildProcess.<anonymous> (/tmp/build_81c895bc33520498d87f9abc614abd7c/.heroku/node/lib/node_modules/npm/lib/utils/spawn.js:24:14)
npm verb stack at emitTwo (events.js:100:13)
npm verb stack at ChildProcess.emit (events.js:185:7)
npm verb stack at maybeClose (internal/child_process.js:827:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
npm verb pkgid my-app@0.1.0
npm verb cwd /tmp/build_81c895bc33520498d87f9abc614abd7c
npm ERR! Linux 3.13.0-77-generic
npm ERR! argv "/tmp/build_81c895bc33520498d87f9abc614abd7c/.heroku/node/bin/node" "/tmp/build_81c895bc33520498d87f9abc614abd7c/.heroku/node/bin/npm" "run" "compile"
npm ERR! node v5.7.0
npm ERR! npm v3.7.5
npm ERR! code ELIFECYCLE
npm ERR! my-app@0.1.0 compile: `better-npm-run compile`
npm ERR! Exit status 1
npm ERR!
My app is based on this (awesome! :) ) starter-kit and all the main important config files left almost untouched.
I figured out what caused this error. I did rm -rf node_modules
, then npm cache clear
and then npm install --production
.
After that, when I ran npm run compile
error was shown, that redux-devtools-dock-monitor
and redux-devtools-log-monitor
was missing. So I've moved them to dependencies
section in package.json and the error is gone! Yay!
However I had to add eslint-config-standard-jsx
to dependencies
also, as well as I had to change server/main.js
a bit to make production server start without errors:
// ...
// ------------------------------------
// Apply Webpack HMR Middleware
// ------------------------------------
if (config.env === 'development') {
const webpackDevMiddleware = require('./middleware/webpack-dev').default
const webpackHMRMiddleware = require('./middleware/webpack-hmr').default
const compiler = webpack(webpackConfig)
// Enable webpack-dev and webpack-hot middleware
const { publicPath } = webpackConfig.output
app.use(webpackDevMiddleware(compiler, publicPath))
app.use(webpackHMRMiddleware(compiler))
// ...
Thanks for the info @romanenko, I will make those changes in master later.
Oh thanks @romanenko ! Not easy to catch. I hope I will be able to deploy on heroku after this fix :)
Going to close this for now since the issue is actually tangential as @romanenko has figured out (production-only dependencies) and has a bigger scope (improved error reporting). I will be creating a more formal issue to tackle this once I return from vacation.