Reputation: 11
I'm trying to run "npm run dev" with my Laravel project. But this keeps ending up in an error "ERR! code ELIEFECYCLE"
I've basically tried a lot of different solutions... Tried everything in this one: laravel npm run dev ERR! code ELIFECYCLE Failed at the @ development script
and even followed the link in that post with no luck. I've been pulling my hair out trying to solve this...
Deleted nodes-modules A LOT. And reinstalls of NPM. Force cleared the cache. Different webpack versions and so on.. But if i try different versions I get an error saying it doesn't match API scheme version.
So now. I'm looking here for some answers/help.
This is from my command line after I ran "npm run dev"
#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
#FailureMessage Object: 0000005E5DCFDB70npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
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`
npm ERR! Exit status 3221225477
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\stito\AppData\Roaming\npm-cache\_logs\2019-04-28T21_34_16_881Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 3221225477
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 3221225477
npm ERR!
npm ERR! Failed at the @ dev 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\stito\AppData\Roaming\npm-cache\_logs\2019-04-28T21_34_16_900Z-debug.log
Log file
0 info it worked if it ends with ok
1 verbose cli [
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 'dev'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 info lifecycle @~dev: @
7 verbose lifecycle @~dev: unsafe-perm in lifecycle true
8 verbose lifecycle @~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\stito\Documents\Toftes IT Service\dev\toftesitservice\node_modules\.bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;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:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\NVIDIA Corporation\NVIDIA NGX;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Common Files\Autodesk Shared\;C:\Program Files (x86)\Autodesk\Backburner\;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs\;C:\Users\stito\AppData\Local\Microsoft\WindowsApps;C:\Users\stito\AppData\Roaming\Composer\vendor\bin;C:\Users\stito\AppData\Roaming\npm
9 verbose lifecycle @~dev: CWD: C:\Users\stito\Documents\Toftes IT Service\dev\toftesitservice
10 silly lifecycle @~dev: Args: [ '/d /s /c', 'npm run development' ]
11 silly lifecycle @~dev: Returned: code: 3221225477 signal: null
12 info lifecycle @~dev: Failed to exec dev script
13 verbose stack Error: @ dev: `npm run development`
13 verbose stack Exit status 3221225477
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:196: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:196:13)
13 verbose stack at maybeClose (internal/child_process.js:1000:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)
14 verbose pkgid @
15 verbose cwd C:\Users\stito\Documents\Toftes IT Service\dev\toftesitservice
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" "dev"
18 verbose node v12.0.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 3221225477
22 error @ dev: `npm run development`
22 error Exit status 3221225477
23 error Failed at the @ dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225477, true ]
package.json file
{
"private": true,
"scripts": {
"dev": "npm run development",
"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 run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"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"
},
"devDependencies": {
"axios": "^0.18",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.10"
}
}
This is now solved.. I solved it by downgrading Node.js to 10.15.3 from 12.1.0
Upvotes: 0
Views: 978
Reputation: 1
First: check your node.js version Write: $ node -v
Make sure that your node.js version is up to date to the latest
If your version is cool then do the following:
Step 1: $ npm cache clean --force
Step 2: Delete node_modules by $ rm -rf node_modules , $ rmdir /S /Q node_modules (in windows) or delete it manually by going into the directory and right-click > delete / move to trash.
If you are not updating your packages you can delete the package-lock.json file too. $ rm ./package-lock.json or delete it manually by going into the file and right-click > delete / move to trash.
To start again, $ npm start
This worked for me. Hopes it works for you too.
Upvotes: 0
Reputation: 11
This is now solved.. I solved it by downgrading Node.js to 10.15.3 from 12.1.0 And started from scratch with NPM in my Laravel project.
Upvotes: 1