5

I had to format my drive and one of my projects is not working anymore. All the other same type of projects are working fine. It's Laravel + Vue JS. The problem is I cannot run npm run watch/dev or prodution. All of them are giving errors. Laravel 5.7 npm ver 6.4.1 node ver 10.15.0 windows 10

I've installed/uninstalled different node versions, no dice. I've deleted/install node modules again numerous time, nothing.

the error I'm getting, with npm run watch

@ watch C:\wamp64\www\projects\project.local npm run development -- --watch

@ development C:\wamp64\www\projects\project.local cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"

npm ERR! code ELIFECYCLE npm ERR! errno 3221225725 npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" npm ERR! Exit status 3221225725 npm ERR! npm ERR! Failed at the @ development 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! C:\Users\Anthony\AppData\Roaming\npm-cache_logs\2019-01-14T07_07_30_914Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 3221225725 npm ERR! @ watch: npm run development -- --watch npm ERR! Exit status 3221225725 npm ERR! npm ERR! Failed at the @ watch 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! C:\Users\Anthony\AppData\Roaming\npm-cache_logs\2019-01-14T07_07_31_435Z-debug.log

the error I'm getting, with npm run production

enter image description here

@ production C:\wamp64\www\projects\project.local 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! code ELIFECYCLE npm ERR! errno 3221225725 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 3221225725 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! C:\Users\Anthony\AppData\Roaming\npm-cache_logs\2019-01-14T07_08_21_587Z-debug.log

this is the log file

enter image description here

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'production' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preproduction', 'production', 'postproduction' ]
5 info lifecycle @~preproduction: @
6 info lifecycle @~production: @
7 verbose lifecycle @~production: unsafe-perm in lifecycle true
8 verbose lifecycle @~production: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\wamp64\www\projects\project.local\node_modules\.bin;C:\CMDER\bin;C:\CMDER\vendor\conemu-maximus5\ConEmu\Scripts;C:\CMDER\vendor\conemu-maximus5;C:\CMDER\vendor\conemu-maximus5\ConEmu;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\ComposerSetup\bin;C:\Program Files\PuTTY\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\wamp64\bin\php\php7.2.14;C:\Program Files\nodejs\;C:\Users\Anthony\AppData\Local\Microsoft\WindowsApps;C:\Users\Anthony\AppData\Roaming\Composer\vendor\bin;C:\Users\Anthony\AppData\Roaming\npm;C:\Program Files\Git\mingw64;C:\Program Files\Git\usr\bin;C:\CMDER
9 verbose lifecycle @~production: CWD: C:\wamp64\www\projects\project.local
10 silly lifecycle @~production: Args: [ '/d /s /c',
10 silly lifecycle   'cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' ]
11 silly lifecycle @~production: Returned: code: 3221225725  signal: null
12 info lifecycle @~production: Failed to exec production script
13 verbose stack Error: @ 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`
13 verbose stack Exit status 3221225725
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid @
15 verbose cwd C:\wamp64\www\projects\project.local
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "production"
18 verbose node v10.15.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 3221225725
22 error @ 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`
22 error Exit status 3221225725
23 error Failed at the @ production script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225725, true ]

3 Answers 3

7

This could be related to invalid .env file, if issues happen during parsing then such strange things can happen. Check if all MIX_ parameters are correct and ${} values are resolved. Pay attention to things like that.

PUSHER_APP_KEY=123
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
2
  • Indeed, vue-cli-service serve returns nothing with npm error without any explanation. This issue caused by an env file used by docker compose. Thank you @Margus Commented Jan 6, 2021 at 18:23
  • Thank you, so much! I have this error in Node JS + Next JS and it was realted to some missing env variables.
    – tirmey
    Commented Jan 21, 2021 at 2:20
0

npm install laravel-mix@^4.0.0 --save-dev

Research the version you were using before or which you should use

0

In my case this code path throws the error:

static _map = new Map<string, number>();
...
// If this._map has no values - the error is thrown!
let maxVal = Math.max(...this._map.values());

Not the answer you're looking for? Browse other questions tagged or ask your own question.