G
G
GooDay2Die2017-05-28 20:43:32
Windows
GooDay2Die, 2017-05-28 20:43:32

Laravel, npm run dev and any other project build commands stopped working after a critical Windows error, what could be the problem?

Good day to all!
The essence of the problem: After a windows 10 critical error with npm run watch enabled and a forced restart of windows, any project build command leads to an error, here is the "npm run dev" run log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\nloschenin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using [email protected]4.6.1
3 info using [email protected].10.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 silly lifecycle @~predev: no script for predev, continuing
7 info lifecycle @~dev: @
8 verbose lifecycle @~dev: unsafe-perm in lifecycle true
9 verbose lifecycle @~dev: PATH: C:\Users\nloschenin\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\OpenServer\domains\dimovoj.local\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\nloschenin\AppData\Local\Microsoft\WindowsApps;C:\cygwin64\bin;C:\Users\nloschenin\AppData\Roaming\Composer\vendor\bin;C:\Users\nloschenin\AppData\Roaming\npm;C:\Program Files\Git\bin
10 verbose lifecycle @~dev: CWD: C:\OpenServer\domains\dimovoj.local
11 silly lifecycle @~dev: Args: [ '/d /s /c', 'npm run development' ]
12 silly lifecycle @~dev: Returned: code: 1  signal: null
13 info lifecycle @~dev: Failed to exec dev script
14 verbose stack Error: @ dev: `npm run development`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\nloschenin\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\nloschenin\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:886:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid @
16 verbose cwd C:\OpenServer\domains\dimovoj.local
17 verbose Windows_NT 10.0.15063
18 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\nloschenin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
19 verbose node v6.10.3
20 verbose npm  v4.6.1
21 error code ELIFECYCLE
22 error errno 1
23 error @ dev: `npm run development`
23 error Exit status 1
24 error Failed at the @ dev script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

package.json :
{
  "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": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "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 --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "devDependencies": {
    "axios": "^0.15.3",
    "bootstrap-sass": "^3.3.7",
    "cross-env": "^5.0.0",
    "jquery": "^3.1.1",
    "laravel-mix": "0.*",
    "lodash": "^4.17.4",
    "vue": "^2.1.10"
  },
  "dependencies": {}
}

What I already tried to do:
  1. reinstall Node
  2. Delete the Node_modules folder
  3. npm cache clean => npm install
  4. manipulations with package.json (paths to script files, removing .js insertion, etc.)

But if you create a new project through composer , then npm run dev and other commands work fine there ... After the last Windows update, crits began and every time I transfer my code to a clean project, I'm tormented ... What could be the problem, maybe someone faced it?
Thanks in advance for the help and the hint in which direction to dig!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GooDay2Die, 2017-05-28
@GooDay2Die

I figured out the problem... After a critical error, roll back the changes in the ./public/mix-manifest.json file, for example, I should have this:

{
  "/js/app.js": "/js/app.js",
  "/css/app.css": "/css/app.css"
}

But what happened after the crit:
410aac0a51c249049187fdae8e0a81a8.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question