I am trying to execute npm run watch from the Windows Command Line in my Laravel-Vue Project. I am using the following:
Windows 10 Home Edition
Node Version 7.10.0
npm version 5.5.1
Here is my
package.json:
{
"private": true,
"devDependencies": {
"watchify": "^1.0.6",
"bootstrap-sass": "^3.0.0",
"laravel-elixir": "^2.0.0",
"coffee-script": "^1.8.0",
"coffeeify": "^1.1.0",
"gulp": "^3.8.8",
"gulp-clean-css": "*",
"stringify": "^3.1.0",
"vue": "*"
},
"scripts": {
"watch": "watchify -v -t coffeeify -t stringify resources/assets/js/app.js -o public/js/bundle.js",
"build": "browserify -v -t coffeeify -t stringify resources/assets/js/app.js -o public/js/bundle.js"
}
}
Whenever I run the command, I am getting the following error:
> # watch C:\xampp\htdocs\software_vue
> watchify -v -t coffeeify -t stringify resources/assets/js/app.js -o public/js/bundle.js
path.js:7
throw new TypeError('Path must be a string. Received ' + inspect(path));
^
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.dirname (path.js:695:5)
at Deps.lookupPackage (C:\xampp\htdocs\software_vue\node_modules\module-deps\index.js:452:29)
at Deps._transform (C:\xampp\htdocs\software_vue\node_modules\module-deps\index.js:93:10)
at Deps.Transform._read (C:\xampp\htdocs\software_vue\node_modules\readable-stream\lib\_stream_transform.js:184:10)
at Deps.Transform._write (C:\xampp\htdocs\software_vue\node_modules\readable-stream\lib\_stream_transform.js:172:12)
at Labeled.Pipeline._write (C:\xampp\htdocs\software_vue\node_modules\stream-splicer\index.js:73:22)
at doWrite (C:\xampp\htdocs\software_vue\node_modules\readable-stream\lib\_stream_writable.js:279:12)
at writeOrBuffer (C:\xampp\htdocs\software_vue\node_modules\readable-stream\lib\_stream_writable.js:266:5)
at Labeled.Writable.write (C:\xampp\htdocs\software_vue\node_modules\readable-stream\lib\_stream_writable.js:211:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # watch: `watchify -v -t coffeeify -t stringify resources/assets/js/app.js -o public/js/bundle.js`
npm ERR! Exit status 1
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\Debarun Pal\AppData\Roaming\npm-cache\_logs\2017-10-09T10_17_15_209Z-debug.log
Debug Log Dump
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 'cache',
1 verbose cli 'clean' ]
2 info using npm#5.5.1
3 info using node#v7.10.0
4 verbose npm-session 1bde4f10d2ea77e8
5 verbose stack Error: As of npm#5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.
5 verbose stack
5 verbose stack If you're sure you want to delete the entire cache, rerun this command with --force.
5 verbose stack at clean (C:\Program Files\nodejs\node_modules\npm\lib\cache.js:70:22)
5 verbose stack at EventEmitter.cache (C:\Program Files\nodejs\node_modules\npm\lib\cache.js:45:16)
5 verbose stack at Object.commandCache.(anonymous function) (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:149:13)
5 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:84:30)
5 verbose stack at _combinedTickCallback (internal/process/next_tick.js:73:7)
5 verbose stack at process._tickCallback (internal/process/next_tick.js:104:9)
6 verbose cwd C:\xampp\htdocs\software_vue
7 verbose Windows_NT 10.0.15063
8 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "cache" "clean"
9 verbose node v7.10.0
10 verbose npm v5.5.1
11 error As of npm#5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.
11 error
11 error If you're sure you want to delete the entire cache, rerun this command with --force.
12 verbose exit [ 1, true ]
I am unable to trace back to the issue and kind of lost, rather, where to start debugging.
Related
Hey guys figured this place would most likely be able to help me.
So i have 2 react projects project A and project B
Whenever i run project B and then finish and try to run project A(npm start) i get error react-scripts error.
Also it only happens to project A, project B can be re run as many times as i want with no error.
I get following error:
$ npm start
> react-only-template#0.1.0 start E:\projects\project-a
> react-scripts start
The system cannot find the path specified.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-only-template#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-only-template#0.1.0 start 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:
Log file:
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 'start' ]
2 info using npm#6.14.11
3 info using node#v10.24.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle react-only-template#0.1.0~prestart: react-only-template#0.1.0
6 info lifecycle react-only-template#0.1.0~start: react-only-template#0.1.0
7 verbose lifecycle react-only-template#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle react-only-template#0.1.0~start: PATH: C:\Users\neman\AppData\Roaming\nvm\v10.24.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\projects\project-a\node_modules\.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\neman\bin;C:\Users\neman\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\neman\bin;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\Microsoft VS Code\bin;C:\ProgramData\ComposerSetup\bin;E:\xampp\php;E:\php-7.4.7;E:\Vagrant\bin;%NVM_HOME%;%NVM_SYMLINK%;C:\ProgramData\chocolatey\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\neman\AppData\Local\Microsoft\WindowsApps;C:\Users\neman\AppData\Roaming\Composer\vendor\bin;C:\Users\neman\AppData\Roaming\npm;C:\Users\neman\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle react-only-template#0.1.0~start: CWD: E:\projects\project-a
10 silly lifecycle react-only-template#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle react-only-template#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle react-only-template#0.1.0~start: Failed to exec start script
13 verbose stack Error: react-only-template#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\neman\AppData\Roaming\nvm\v10.24.0\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\neman\AppData\Roaming\nvm\v10.24.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid react-only-template#0.1.0
15 verbose cwd E:\projects\project-a
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.24.0
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 1
22 error react-only-template#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the react-only-template#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
node version 10.24.0
npm: 6.14.11
Also react scripts are not installed globally!
project A:
Is CRA app
"react": "^17.0.1",
"react-scripts": "^4.0.0",
Project B:
Is also CRA app
"react": "^16.13.1",
"react-scripts": "^3.4.3",
Only way I can run project A again is if I restart my PC which is really really panful as I have to re-run docker and a lot of other apps.
I would appreciate anyone who has any suggestions on how to solve this permanently or at least make it so I don't have to restart my computer
This things happens. Have you tried deleting node_moduled, package-lock.json and run this command ? npm cache clean --force
I'm rather new to the nodejs world and having trouble with some basics ,
when I do npm install it shows a few warn messages but complete it .
when I do npm build it works fine
but when I do run start:dev it crashes with this error message :
concurrently\bin\concurrently.js:140
let lastColor;
^^^^^^^^^
SyntaxError: Unexpected identifier
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start:dev"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! izi-backend#0.0.1 start:dev: `concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json" `
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the izi-backend#0.0.1 start:dev script 'concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json" '.
npm ERR! This is most likely a problem with the izi-backend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json"
npm ERR! You can get their info via:
npm ERR! npm owner ls izi-backend
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\dev\iziMobile\izi-server\npm-debug.log
where npm run start:dev is defined as :
"start:dev": "concurrently --handle-input \"wait-on dist/main.js && nodemon\" \"tsc -w -p tsconfig.build.json\" "
also printing out npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files (x86)\nodejs\\node.exe',
1 verbose cli 'C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'start:dev' ]
2 info using npm#2.7.4
3 info using node#v0.12.2
4 verbose node symlink C:\Program Files (x86)\nodejs\node.exe
5 verbose run-script [ 'prestart:dev', 'start:dev', 'poststart:dev' ]
6 info prestart:dev izi-backend#0.0.1
7 info start:dev izi-backend#0.0.1
8 verbose unsafe-perm in lifecycle true
9 info izi-backend#0.0.1 Failed to exec start:dev script
10 verbose stack Error: izi-backend#0.0.1 start:dev: concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json"
10 verbose stack Exit status 1
10 verbose stack at EventEmitter. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
10 verbose stack at EventEmitter.emit (events.js:110:17)
10 verbose stack at ChildProcess. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:14:12)
10 verbose stack at ChildProcess.emit (events.js:110:17)
10 verbose stack at maybeClose (child_process.js:1015:16)
10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid izi-backend#0.0.1
12 verbose cwd C:\dev\iziMobile\izi-server
13 error Windows_NT 6.3.9600
14 error argv "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "start:dev"
15 error node v0.12.2
16 error npm v2.7.4
17 error code ELIFECYCLE
18 error izi-backend#0.0.1 start:dev: concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json"
18 error Exit status 1
19 error Failed at the izi-backend#0.0.1 start:dev script 'concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json" '.
19 error This is most likely a problem with the izi-backend package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error concurrently --handle-input "wait-on dist/main.js && nodemon" "tsc -w -p tsconfig.build.json"
19 error You can get their info via:
19 error npm owner ls izi-backend
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]<
Concurrently is a package I take in packages.json so I doubt there is really an error there...
Am I missing anything ?
Any help will do at this point
Node v0.12.2 does not support the let declarations.
See here for the full version support matrix.
You are using node version v0.12.2. let syntax is not supported.
From node.green you can see that let is supported from Node v6.4.x
I was trying to learn react, so I have this sample code of my first react app, and I am trying to get it work but after running npm install followed by npm start I receive the following error:
C:\Users\Ak\Desktop\reactapp>npm start
> reactapp#1.0.0 start C:\Users\Ak\Desktop\reactapp
> webpack-dev-server --hot
The CLI moved into a separate package: webpack-cli
Please install 'webpack-cli' in addition to webpack itself to use the CLI
-> When using npm: npm i -D webpack-cli
-> When using yarn: yarn add -D webpack-cli
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'webpack-cli/bin/config-yargs'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (C:\Users\Ak\Desktop\reactapp\node_modules\webpack-dev-server\bin\webpack-dev-server.js:60:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactapp#1.0.0 start: `webpack-dev-server --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactapp#1.0.0 start 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\Ak\AppData\Roaming\npm-cache\_logs\2019-06-07T07_08_01_594Z-debug.log
Don't know how to solve this issue.
Here is my log file.
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 'start' ]
2 info using npm#6.9.0
3 info using node#v10.16.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle reactapp#1.0.0~prestart: reactapp#1.0.0
6 info lifecycle reactapp#1.0.0~start: reactapp#1.0.0
7 verbose lifecycle reactapp#1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle reactapp#1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Ak\Desktop\reactapp\node_modules\.bin;G:\Software files\Python\Scripts\;G:\Software files\Python\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;G:\Software files\Brackets Editor\command;C:\Program Files\nodejs\;C:\Users\Ak\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\Ak\AppData\Local\Programs\Python\Python36\;G:\Software files\Java\bin;C:\Users\Ak\AppData\Local\Microsoft\WindowsApps;G:\Software files\NMDVPN\bin;C:\Users\Ak\AppData\Roaming\npm
9 verbose lifecycle reactapp#1.0.0~start: CWD: C:\Users\Ak\Desktop\reactapp
10 silly lifecycle reactapp#1.0.0~start: Args: [ '/d /s /c', 'webpack-dev-server --hot' ]
11 silly lifecycle reactapp#1.0.0~start: Returned: code: 1 signal: null
12 info lifecycle reactapp#1.0.0~start: Failed to exec start script
13 verbose stack Error: reactapp#1.0.0 start: `webpack-dev-server --hot`
13 verbose stack Exit status 1
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:198: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:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid reactapp#1.0.0
15 verbose cwd C:\Users\Ak\Desktop\reactapp
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error reactapp#1.0.0 start: `webpack-dev-server --hot`
22 error Exit status 1
23 error Failed at the reactapp#1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Here is my package.json file:
{
"name": "reactapp",
"version": "1.0.0",
"description": "Learning ReactJs with AK",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --hot"
},
"keywords": [
"npm",
"learn",
"react"
],
"author": "AK",
"license": "UNLICENSED",
"dependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^8.0.6",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"webpack": "^4.33.0",
"webpack-dev-server": "^3.7.0"
}
}
I have installed the react using Nodejs through npm installer.
The first 3 lines of the error message advise what to do.
You need to install webpack-cli in order to run the webpack-dev-server. If you run the command it's giving you, you'll install webpack-cli as a devDependency and it'll all run.
If you're going to be using webpack a lot going forward it may be worth installing it globally, rather than needing to add it each time.
The CLI moved into a separate package: webpack-cli
Please install 'webpack-cli' in addition to webpack itself to use the CLI
-> When using npm: npm i -D webpack-cli
Out of the blue build script started to fail. No changes in environment or configs at all. Works fine in dev, fails in prod.
Both dev and prod (both Ubuntus):
$ npm -v
5.3.0
$ node -v
v6.11.2
In dev:
oleg#DevVM ~/Code/loaded.bike/assets $ npm run deploy
> # deploy /home/oleg/Code/loaded.bike/assets
> brunch build --production
17:49:59 - info: compiling
17:49:59 - info: compiled 19 files into 2 files, copied 32 in 6.9 sec
In prod:
deploy#loaded-bike-app:~/builds/assets$ npm run deploy
> # deploy /home/deploy/builds/assets
> brunch build --production
00:45:30 - error: Initialization error - Could not load global module 'jquery'. Possible solution: add 'jquery' to package.json and `npm install`. Could not load global module 'jquery'. Possible solution: add 'jquery' to package.json and `npm install`.
Stack trace was suppressed. Run with `LOGGY_STACKS=1` to see the trace.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # deploy: `brunch build --production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # deploy 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! /home/deploy/.npm/_logs/2017-08-12T00_45_30_084Z-debug.log
Full log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'deploy' ]
2 info using npm#5.3.0
3 info using node#v6.11.2
4 verbose run-script [ 'predeploy', 'deploy', 'postdeploy' ]
5 info lifecycle #~predeploy: #
6 info lifecycle #~deploy: #
7 verbose lifecycle #~deploy: unsafe-perm in lifecycle true
8 verbose lifecycle #~deploy: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/deploy/builds/assets/node_modules/.bin:/home/deploy/bin:/home/deploy/.local
/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle #~deploy: CWD: /home/deploy/builds/assets
10 silly lifecycle #~deploy: Args: [ '-c', 'brunch build --production' ]
11 silly lifecycle #~deploy: Returned: code: 1 signal: null
12 info lifecycle #~deploy: Failed to exec deploy script
13 verbose stack Error: # deploy: `brunch build --production`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:289:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at EventEmitter.emit (events.js:191:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:891:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid #
15 verbose cwd /home/deploy/builds/assets
16 verbose Linux 4.8.0-41-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "deploy"
18 verbose node v6.11.2
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 1
22 error # deploy: `brunch build --production`
22 error Exit status 1
23 error Failed at the # deploy script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Adding jquery, tether to package.json fixes require error but then it just chokes on sass compile. Is this just JS missfiring async function out of order or what is going here? Once again, it started to fail completely out of the blue. Deployed just fine yesterday and today if fails without me changing anything. Any clue what might be wrong here?
EDIT:
package.json:
{
"repository": {},
"license": "MIT",
"scripts": {
"deploy": "brunch build --production",
"watch": "brunch watch --stdin"
},
"dependencies": {
"bootstrap": "^4.0.0-alpha.6",
"phoenix": "file:../deps/phoenix",
"phoenix_html": "file:../deps/phoenix_html"
},
"devDependencies": {
"babel-brunch": "6.0.6",
"brunch": "2.10.10",
"clean-css-brunch": "2.10.0",
"css-brunch": "2.10.0",
"sass-brunch": "2.10.4",
"uglify-js-brunch": "2.1.1"
}
}
I'm actually seeing this crap on prod (but not on dev)
npm ERR! peer dep missing: jquery#>=3.0.0, required by bootstrap#4.0.0-beta
npm ERR! peer dep missing: popper.js#^1.11.0, required by bootstrap#4.0.0-beta
What is that about? Bootstrap defines those as dependencies (not peerDependency) in its own package.json. npm doesn't pull in dependencies now?
"bootstrap": "^4.0.0-alpha.6"
Needed to lock the version. Bootstrap went from alpha.6 to beta yesterday. Messed everything up. No idea why is started to fail only on one machine (even after npm cache clear). Sass compile fails under beta, so I locked it to alpha.6 for now.
I think I need to start locking dependency versions. This took way too long to figure out.
I am trying to built a MEAN Todo app by following https://github.com/michaelcheng429/super-mean-stack
package.json
{
"name": "ToDoThoughts",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "NODE_PATH=$NODE_PATH:./app node server",
"dev": "npm start & webpack-dev-server --progress --colors"
},
"license": "ISC",
"dependencies": {
"angular": "1.4.12",
"angular-ui-router": "0.3.1",
"body-parser": "1.15.2",
"bootstrap": "3.3.7",
"express": "4.14.0"
},
"devDependencies": {
"babel-core": "6.17.0",
"babel-preset-es2015": "6.16.0",
"raw-loader": "0.5.1",
"webpack": "1.13.2",
"webpack-dev-server": "1.16.2"
},
"engines": {
"node": "5.5.0"
}
}
I am getting error when i run the command "npm run dev" in the command prompt.
I have also attached npm.debug.log
> ToDoThoughts#1.0.0 start C:\Projects\ToDoThoughts
> NODE_PATH=$NODE_PATH:./app node server
'NODE_PATH' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Selva\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.5.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ToDoThoughts#1.0.0 start: `NODE_PATH=$NODE_PATH:./app node server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ToDoThoughts#1.0.0 start script 'NODE_PATH=$NODE_PATH:./app node server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ToDoThoughts package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! NODE_PATH=$NODE_PATH:./app node server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ToDoThoughts
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ToDoThoughts
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Projects\ToDoThoughts\npm-debug.log
npm.debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Selva\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#3.10.8
3 info using node#v6.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ToDoThoughts#1.0.0~prestart: ToDoThoughts#1.0.0
6 silly lifecycle ToDoThoughts#1.0.0~prestart: no script for prestart, continuing
7 info lifecycle ToDoThoughts#1.0.0~start: ToDoThoughts#1.0.0
8 verbose lifecycle ToDoThoughts#1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle ToDoThoughts#1.0.0~start: PATH: C:\Users\Selva\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Projects\ToDoThoughts\node_modules\.bin;C:\Users\Selva\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Projects\ToDoThoughts\node_modules\.bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;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\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Skype\Phone\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\Selva\AppData\Local\Microsoft\WindowsApps;C:\Users\Selva\AppData\Roaming\npm;C:\Users\Selva\AppData\Local\atom\bin;C:\Program Files\Git\bin;C:\Projects\ToDoThoughts
10 verbose lifecycle ToDoThoughts#1.0.0~start: CWD: C:\Projects\ToDoThoughts
11 silly lifecycle ToDoThoughts#1.0.0~start: Args: [ '/d /s /c', 'NODE_PATH=$NODE_PATH:./app node server' ]
12 silly lifecycle ToDoThoughts#1.0.0~start: Returned: code: 1 signal: null
13 info lifecycle ToDoThoughts#1.0.0~start: Failed to exec start script
14 verbose stack Error: ToDoThoughts#1.0.0 start: `NODE_PATH=$NODE_PATH:./app node server`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Users\Selva\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:255: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\Selva\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:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid ToDoThoughts#1.0.0
16 verbose cwd C:\Projects\ToDoThoughts
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Selva\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v6.5.0
20 error npm v3.10.8
21 error code ELIFECYCLE
22 error ToDoThoughts#1.0.0 start: `NODE_PATH=$NODE_PATH:./app node server`
22 error Exit status 1
23 error Failed at the ToDoThoughts#1.0.0 start script 'NODE_PATH=$NODE_PATH:./app node server'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ToDoThoughts package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error NODE_PATH=$NODE_PATH:./app node server
23 error You can get information on how to open an issue for this project with:
23 error npm bugs ToDoThoughts
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls ToDoThoughts
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
NPM scripts are executed in the shell from which NPM was invoked.
NODE_PATH=$NODE_PATH:./app node server will not behave correctly if you're using the command prompt or Powershell on Windows. If you already have Git installed, then you should use Git Bash which should already be available.
Otherwise, you might install the MSYS' or Cygwin's Bash shell.
Node on installation should be installed in your systems environment variables and should be called using node in PowerShell or cmd.
This should mean there's no need to always insert the node path in your environment variables.
Make sure you're running PowerShell or cmd as administrator as well, this ensure system environment variables are being picked up.
Lastly, in your package.json change to:
"scripts": {
"start": "node server.js",
"dev": "start cmd /k \"webpack-dev-server --progress --colors\" & node server.js"
}
then run npm start and your server should be running.
"scripts": {
"start": "node server.js",
"dev": "start cmd /k \"webpack-dev-server --progress --colors\" & node server.js"
}
npm cache clean
Then clear package-lock.json file