Why can't I use "npm start" in my React app? - javascript

I am trying to initialize the npm start command on my newly created React app. This is the first time I am doing this, and I have no clue what's happening.
Node version: 12.14.1
npm version: 6.13.4
I've tried to find the solution and I couldn't.
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 'start'
1 verbose cli ]
2 info using npm#6.13.4
3 info using node#v12.14.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle myapp#0.1.0~prestart: myapp#0.1.0
6 info lifecycle myapp#0.1.0~start: myapp#0.1.0
7 verbose lifecycle myapp#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle myapp#0.1.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Gianfranco Vasallo\Desktop\myapp\node_modules\.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Gianfranco Vasallo\bin;C:\Users\Gianfranco Vasallo\AppData\Roaming\npm;C:\Program Files\nodejs;C:\wamp\bin\php\php7.4.0;C:\ProgramData\ComposerSetup\bin;C:\Program Files\MySQL\MySQL Shell 8.0\bin;C:\Users\Gianfranco Vasallo\AppData\Roaming\npm;C:\Users\Gianfranco Vasallo\AppData\Roaming\Composer\vendor\bin;C:\Users\Gianfranco Vasallo\AppData\Local\Programs\Microsoft VS Code\bin
9 verbose lifecycle myapp#0.1.0~start: CWD: C:\Users\Gianfranco Vasallo\Desktop\myapp
10 silly lifecycle myapp#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle myapp#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle myapp#0.1.0~start: Failed to exec start script
13 verbose stack Error: myapp#0.1.0 start: `react-scripts start`
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:332:16)
13 verbose stack at EventEmitter.emit (events.js:223:5)
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:223:5)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid myapp#0.1.0
15 verbose cwd C:\Users\Gianfranco Vasallo\Desktop\myapp
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.14.1
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error myapp#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the myapp#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 ]```

Related

`21 error errno 1 22 error my-app#0.1.0 start: `react-scripts start` 22 error Exit status 1` Error while starting react-js

I'm trying to launch a react-js app and it keeps saying this
0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ] 2 info using npm#6.14.4 3 info using node#v10.19.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle my-app#0.1.0~prestart: my-app#0.1.0 6 info lifecycle my-app#0.1.0~start: my-app#0.1.0 7 verbose lifecycle my-app#0.1.0~start: unsafe-perm in lifecycle true 8 verbose lifecycle my-app#0.1.0~start: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/filipthedev/my-app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 9 verbose lifecycle my-app#0.1.0~start: CWD: /home/filipthedev/my-app 10 silly lifecycle my-app#0.1.0~start: Args: [ '-c', 'react-scripts start' ] 11 silly lifecycle my-app#0.1.0~start: Returned: code: 1 signal: null 12 info lifecycle my-app#0.1.0~start: Failed to exec start script 13 verbose stack Error: my-app#0.1.0 start: react-scripts start13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/share/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> (/usr/share/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 my-app#0.1.0 15 verbose cwd /home/filipthedev/my-app 16 verbose Linux 5.15.0-50-generic 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start" 18 verbose node v10.19.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error my-app#0.1.0 start:react-scripts start 22 error Exit status 1 23 error Failed at the my-app#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 ]
My npm and node are updated to the latest versions. Can you help me?

Plesk Obsidian, IISNode and Express problem - application only works locally

I have installed a Node.JS + Expres.JS application on my server, with IISNode and Plesk Obsidian. When I surf the page in my browser I get this error:
I have already checked the permissions of the respective folders and the respective "App Identities" have the necessary permissions. Every time I start my application, the following error message is written to the log:
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 'start'
1 verbose cli ]
2 info using npm#6.13.4
3 info using node#v12.15.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle lynx#0.0.0~prestart: lynx#0.0.0
6 info lifecycle lynx#0.0.0~start: lynx#0.0.0
7 verbose lifecycle lynx#0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle lynx#0.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Inetpub\vhosts\kiseni.com\test.kiseni.com\node_modules\.bin;C:\Program Files\nodejs;C:\Program Files (x86)\Mail Enable\BIN;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Mail Enable\BIN64;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Plesk\ctl;C:\Program Files\nodejs\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\.dotnet\tools;C:\Windows\system32\config\systemprofile\AppData\Roaming\npm;C:\Users\kiseniadmin\AppData\Local\Microsoft\WindowsApps
9 verbose lifecycle lynx#0.0.0~start: CWD: C:\Inetpub\vhosts\kiseni.com\test.kiseni.com
10 silly lifecycle lynx#0.0.0~start: Args: [ '/d /s /c', 'node ./bin/www' ]
11 silly lifecycle lynx#0.0.0~start: Returned: code: 1 signal: null
12 info lifecycle lynx#0.0.0~start: Failed to exec start script
13 verbose stack Error: lynx#0.0.0 start: `node ./bin/www`
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:332:16)
13 verbose stack at EventEmitter.emit (events.js:223:5)
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:223:5)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid lynx#0.0.0
15 verbose cwd C:\Inetpub\vhosts\kiseni.com\test.kiseni.com
16 verbose Windows_NT 10.0.14393
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start"
18 verbose node v12.15.0
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error lynx#0.0.0 start: `node ./bin/www`
22 error Exit status 1
23 error Failed at the lynx#0.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 ]
The funny part is that after this error the application is available locally on the server at localhost:3000, but outside the application still has the iisnode error from the first screenshot
I am grateful for any help!
The substatus 1002 is IISNODE_ERROR_PIPE_CONNECTION_BEFORE_PROCESS_TERMINATED. This means your process has terminated, so iisnode cannot pipe data to your node process. Your logs confirm that indeed your process is not starting successfully.
You need to figure out why your node process fails to start. Adding some logging to see how far you get before it crashes will help.

Build Failed Cordova

I am trying to build a Framework7 app with Cordova-build-android
but I am getting errors.
All the variables are set up correctly and I use NVM to manage my node versions.
Here is the error log:
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 'build-cordova-android' ]
2 info using npm#5.6.0
3 info using node#v8.9.4
4 verbose run-script [ 'prebuild-cordova-android',
4 verbose run-script 'build-cordova-android',
4 verbose run-script 'postbuild-cordova-android' ]
5 info lifecycle myapp#1.0.0~prebuild-cordova-android: myapp#1.0.0
6 info lifecycle myapp#1.0.0~build-cordova-android: myapp#1.0.0
7 verbose lifecycle myapp#1.0.0~build-cordova-android: unsafe-perm in lifecycle true
8 verbose lifecycle myapp#1.0.0~build-cordova-android: PATH: C:\Users\CONRAD\AppData\Roaming\nvm\v8.9.4\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\CONRAD\test\node_modules\.bin;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\Microsoft VS Code\bin;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;%NVM_HOME%;%NVM_SYMLINK%;C:\Users\CONRAD\AppData\Roaming\npm;C:\Users\CONRAD\AppData\Roaming\npm;C:\Users\CONRAD\AppData\Roaming\nvm;C:\Program Files\nodejs
9 verbose lifecycle myapp#1.0.0~build-cordova-android: CWD: C:\Users\CONRAD\test
10 silly lifecycle myapp#1.0.0~build-cordova-android: Args: [ '/d /s /c',
10 silly lifecycle 'node ./build/build.js && cd cordova && cordova build android' ]
11 silly lifecycle myapp#1.0.0~build-cordova-android: Returned: code: 1 signal: null
12 info lifecycle myapp#1.0.0~build-cordova-android: Failed to exec build-cordova-android script
13 verbose stack Error: myapp#1.0.0 build-cordova-android: `node ./build/build.js && cd cordova && cordova build android`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\CONRAD\AppData\Roaming\nvm\v8.9.4\node_modules\npm\node_modules\npm-lifecycle\index.js:285: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.<anonymous> (C:\Users\CONRAD\AppData\Roaming\nvm\v8.9.4\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 myapp#1.0.0
15 verbose cwd C:\Users\CONRAD\test
16 verbose Windows_NT 6.1.7600
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-cordova-android"
18 verbose node v8.9.4
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error myapp#1.0.0 build-cordova-android: `node ./build/build.js && cd cordova && cordova build android`
22 error Exit status 1
23 error Failed at the myapp#1.0.0 build-cordova-android script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

"npm run bundle" with Webpack throws ERR! code ELIFECYCLE

I am a newbie in a hurry learning to use Webpack with AngularJS apps.
I've been following the wonderful article below on it, but I get an error when I try to run bundle.
Article I've been following by Ken Howard.
Complete 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:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'bundle' ]
2 info using npm#5.6.0
3 info using node#v8.9.4
4 verbose run-script [ 'prebundle', 'bundle', 'postbundle' ]
5 info lifecycle angular-webpack-starter#1.0.0~prebundle: angular-webpack-starter#1.0.0
6 info lifecycle angular-webpack-starter#1.0.0~bundle: angular-webpack-starter#1.0.0
7 verbose lifecycle angular-webpack-starter#1.0.0~bundle: unsafe-perm in lifecycle true
8 verbose lifecycle angular-webpack-starter#1.0.0~bundle: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Usuario\Desktop\angular-webpack-starter\node_modules\.bin;C:\Program Files\Microsoft MPI\Bin\;C:\ActiveTcl\bin;C:\Perl64\site\bin;C:\Perl64\bin;c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\PuTTY\;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Usuario\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\Usuario\AppData\Local\Programs\Python\Python36-32\;C:\ffmpeg\bin;C:\Users\Usuario\AppData\Roaming\npm;C:\Users\Usuario\AppData\Roaming\npm\node_modules\phantomjs-prebuilt\lib\phantom\bin;C:\Users\Usuario\AppData\Local\Yarn\bin\;C:\Program Files (x86)\Microsoft VS Code\bin
9 verbose lifecycle angular-webpack-starter#1.0.0~bundle: CWD: C:\Users\Usuario\Desktop\angular-webpack-starter
10 silly lifecycle angular-webpack-starter#1.0.0~bundle: Args: [ '/d /s /c', 'webpack' ]
11 silly lifecycle angular-webpack-starter#1.0.0~bundle: Returned: code: 1 signal: null
12 info lifecycle angular-webpack-starter#1.0.0~bundle: Failed to exec bundle script
13 verbose stack Error: angular-webpack-starter#1.0.0 bundle: `webpack`
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:285: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.<anonymous> (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 angular-webpack-starter#1.0.0
15 verbose cwd C:\Users\Usuario\Desktop\angular-webpack-starter
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "bundle"
18 verbose node v8.9.4
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error angular-webpack-starter#1.0.0 bundle: `webpack`
22 error Exit status 1
23 error Failed at the angular-webpack-starter#1.0.0 bundle script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Perhaps you are trying to start the server on a port that is already in use. Try changing the default port in lib\server-development.js to something else.

Nuxt.js Failed dev script

I have a site that i've been building using Nuxt.js and I've been loving everything about it but i can't seem to figure out why i'm receiving the following error when I try $npm run dev
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dev' ]
2 info using npm#6.1.0
3 info using node#v8.11.2
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle carlinfitness#1.0.0~predev: carlinfitness#1.0.0
6 info lifecycle carlinfitness#1.0.0~dev: carlinfitness#1.0.0
7 verbose lifecycle carlinfitness#1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle carlinfitness#1.0.0~dev: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/zac/code/carlinFitness/node_modules/.bin:/home/zac/bin:/home/zac/.local/bin:/home/zac/bin:/home/zac/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle carlinfitness#1.0.0~dev: CWD: /home/zac/code/carlinFitness
10 silly lifecycle carlinfitness#1.0.0~dev: Args: [ '-c', 'nuxt' ]
11 silly lifecycle carlinfitness#1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle carlinfitness#1.0.0~dev: Failed to exec dev script
13 verbose stack Error: carlinfitness#1.0.0 dev: `nuxt`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304: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.<anonymous> (/usr/lib/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 carlinfitness#1.0.0
15 verbose cwd /home/zac/code/carlinFitness
16 verbose Linux 4.13.0-43-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
18 verbose node v8.11.2
19 verbose npm v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error carlinfitness#1.0.0 dev: `nuxt`
22 error Exit status 1
23 error Failed at the carlinfitness#1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I concur with Sk_. That error message is caused by a process that is running on port 3000. In may case, I entered http://localhost:3000 in my browser's address bar and behold, my database monitor came up! I then shut the monitor down and tried again. This time, $npm run dev ran without a hitch.
Michael

Categories