1

I have been running to this problem,

$ npm run production

@ production /var/www/html/****
 cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

xnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ production: cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ production 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!     /root/.npm/_logs/2019-02-06T13_49_22_325Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ prod: npm run production
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ prod 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!     /root/.npm/_logs/2019-02-06T13_49_22_696Z-debug.log

Each time this happens, I have to always, remove node_modules and run npm install to then again run npm run production which works after that.

Chris Camaratta
  • 2,729
  • 22
  • 35
Johhn
  • 979
  • 17
  • 24
  • What is your question? – tao Feb 06 '19 at 14:42
  • Well what could be happening, or what am I doing wrong such that once I run `npm run prod`, the next time I have to remove node modules – Johhn Feb 06 '19 at 14:46
  • You should check the permissions on the files before and after the prod run. Sometimes wrong permissions will cause a failure. – Borisu Feb 06 '19 at 14:56
  • Possible duplicate of [What does the ELIFECYCLE Node.js error mean?](https://stackoverflow.com/questions/30744964/what-does-the-elifecycle-node-js-error-mean) – Chris Camaratta Feb 06 '19 at 15:05

1 Answers1

0

Just had to update packages on the server a restart. Everything is working fine now.

apt update restart now

Johhn
  • 979
  • 17
  • 24