reactjs-basics icon indicating copy to clipboard operation
reactjs-basics copied to clipboard

npm start error

Open apoorva-shah opened this issue 8 years ago • 5 comments
trafficstars

Hello @mschwarzmueller , My node version 6.9.4 npm version 4.0.5

I get error on npm start in branch 02-first-component

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Users\apoorvashah\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 silly lifecycle [email protected]~prestart: no script for prestart, continuing 7 info lifecycle [email protected]~start: [email protected] 8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 9 verbose lifecycle [email protected]~start: PATH: C:\Users\apoorvashah\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;D:\wamp\www\reactjs-basics\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft\Web Platform Installer;D:\wamp\bin\php\php5.6.19;C:\ProgramData\ComposerSetup\bin;C:\Users\apoorvashah\AppData\Roaming\Composer\vendor\bin;C:\sqlite;C:\Program Files\Git\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs;D:\wamp\bin\php\php5.6.19\pear;C:\Ruby22\bin;C:\Users\apoorvashah\AppData\Roaming\npm 10 verbose lifecycle [email protected]~start: CWD: D:\wamp\www\reactjs-basics 11 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'npm run build' ] 12 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 13 info lifecycle [email protected]~start: Failed to exec start script 14 verbose stack Error: [email protected] start: npm run build 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (C:\Users\apoorvashah\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. (C:\Users\apoorvashah\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 [email protected] 16 verbose cwd D:\wamp\www\reactjs-basics 17 error Windows_NT 6.2.9200 18 error argv "C:\Program Files\nodejs\node.exe" "C:\Users\apoorvashah\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "start" 19 error node v6.9.4 20 error npm v4.0.5 21 error code ELIFECYCLE 22 error [email protected] start: npm run build 22 error Exit status 1 23 error Failed at the [email protected] start script 'npm run build'. 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 reactjs-basics package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error npm run build 23 error You can get information on how to open an issue for this project with: 23 error npm bugs reactjs-basics 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls reactjs-basics 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

Do you know? Thanks in advance.

apoorva-shah avatar Mar 18 '17 19:03 apoorva-shah

"build": "webpack-dev-server --content-base src/ --inline --hot",

works just fine with this

intertarik avatar Apr 24 '17 17:04 intertarik

i get the following error help `

[email protected] start D:\Documents\reactjs-template npm run build [email protected] build D:\Documents\reactjs-template webpack -d && copy src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot

No configuration file found and no output filename configured via CLI option. A configuration file could be named 'webpack.config.js' in the current directory. Use --help to display the CLI options.

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build" npm ERR! node v6.10.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! [email protected] build: webpack -d && copy src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot npm ERR! Exit status 4294967295 npm ERR! npm ERR! Failed at the [email protected] build script 'webpack -d && copy src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline - -hot'. 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 reactjs-template package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! webpack -d && copy src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs reactjs-template npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls reactjs-template npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! D:\Documents\reactjs-template\npm-debug.log

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" npm ERR! node v6.10.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! [email protected] start: npm run build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script 'npm run build'. 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 reactjs-template package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs reactjs-template npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls reactjs-template npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! D:\Documents\reactjs-template\npm-debug.log

`

rafaelmagalhaes avatar Jun 26 '17 22:06 rafaelmagalhaes

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 [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 info lifecycle [email protected]~start: [email protected] 7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\Tunde\Desktop\ReactJS\ReactJS_Basics\node_modules.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Tunde\bin;C:\Program Files\Microsoft MPI\Bin;C:\WINDOWS\system32;C:\xampp\node;C:\Program Files\nodejs;C:\WINDOWS;C:\Users\Tunde\AppData\Roaming\Composer\vendor\bin;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\dotnet;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\composer;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\xampp\php;C:\Users\Tunde\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\Tunde\AppData\Roaming\npm;C:\Users\Tunde\AppData\Roaming\Composer\vendor\bin 9 verbose lifecycle [email protected]~start: CWD: C:\Users\Tunde\Desktop\ReactJS\ReactJS_Basics 10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'npm run build' ] 11 silly lifecycle [email protected]~start: Returned: code: 2 signal: null 12 info lifecycle [email protected]~start: Failed to exec start script 13 verbose stack Error: [email protected] start: npm run build 13 verbose stack Exit status 2 13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:925:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 14 verbose pkgid [email protected] 15 verbose cwd C:\Users\Tunde\Desktop\ReactJS\ReactJS_Basics 16 verbose Windows_NT 10.0.16299 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" 18 verbose node v8.9.0 19 verbose npm v5.5.1 20 error code ELIFECYCLE 21 error errno 2 22 error [email protected] start: npm run build 22 error Exit status 2 23 error Failed at the [email protected] start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 2, true ]

tundeajao avatar Dec 10 '17 22:12 tundeajao

Inside the script tags in package.json file: This will work,if you are getting an error while running 'npm start'. error:"cp is not recognized as internal or eternal command".

Add : #2 "build": "webpack -d && xcopy "src/index.html" "dist/" /F /Y && webpack-dev-server --content-base src/ --inline", "build:prod": "webpack -p && xcopy "src/index.html" "dist/" /F /Y" instead of : "build": "webpack -d && cp src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline --hot", "build:prod": "webpack -p && cp src/index.html dist/index.html"

VijayNayakG avatar Jan 17 '18 17:01 VijayNayakG