Failed to exec start script when running npm start - javascript

I am receiving this error when trying to start my node application using the npm start command.
From log
10 verbose lifecycle #~start: CWD: F:\reactjs
11 silly lifecycle #~start: Args: [ '/d /s /c', 'webpack-dev-server --hot' ]
12 silly lifecycle #~start: Returned: code: 4294967295 signal: null
13 info lifecycle #~start: Failed to exec start script
14 verbose stack Error: # start: webpack-dev-server --hot
14 verbose stack Exit status 4294967295
14 verbose stack at EventEmitter. (E:\Program
Files\nodejs\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. (E:\Program
Files\nodejs\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:920:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
15 verbose pkgid #
16 verbose cwd F:\reactjs
17 error Windows_NT 10.0.10586
18 error argv "E:\Program Files\nodejs\node.exe" "E:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
19 error node v6.11.3
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error # start: webpack-dev-server --hot
22 error Exit status 4294967295
23 error Failed at the # start script 'webpack-dev-server --hot'.
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 package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error webpack-dev-server --hot
23 error You can get information on how to open an issue for this project with:
23 error npm bugs
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls
23 error There is likely additional logging output above.

Your issue is in your webpack configuration.
The line that gives you this error is line 4
Configuration file found but no entry configured
This might help:
Webpack configuration file found but no entry configured
here is the docs on webpack for entry: https://webpack.github.io/docs/configuration.html#entry

Related

Why when I make a change in the Js file the local server stopped when it's running?

Why when I run npm run dev and make any changes in the Js file the local server stopped when it's running and that's happened for windows os only I tried that for Linux and works fine.
it gives me the next error :
C:\Users\osama\OneDrive\Desktop\calculator workflow\scripts\development.js:66
if (err) throw err;
^
[Error: EPERM: operation not permitted, copyfile 'C:\Users\osama\OneDrive\Desktop\calculator workflow\src\scripts\main.js' -> 'C:\Users\osama\OneDrive\Desktop\calculator workflow\.tmp'] {
errno: -4048,
code: 'EPERM',
syscall: 'copyfile',
path: 'C:\\Users\\osama\\OneDrive\\Desktop\\calculator workflow\\src\\scripts\\main.js',
dest: 'C:\\Users\\osama\\OneDrive\\Desktop\\calculator workflow\\.tmp'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: `node ./scripts/task-runner/tasks.js serve`
npm ERR! Exit status 1
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\osama\AppData\Roaming\npm-cache\_logs\2021-11-23T16_47_01_115Z-debug.log
and this is the 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:\\Users\\osama\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev'
1 verbose cli ]
2 info using npm#6.14.11
3 info using node#v14.16.1
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:\Users\osama\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\osama\OneDrive\Desktop\calculator workflow\node_modules\.bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\osama\bin;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\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\dotnet;C:\Program Files (x86)\dotnet;C:\Program Files\nodejs;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;%SYSTEMROOT%\System32\OpenSSH;C:\Users\osama\AppData\Local\Microsoft\WindowsApps;C:\Users\osama\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\osama\AppData\Local\hyper\app-3.0.2\resources\bin;C:\Users\osama\AppData\Roaming\npm
9 verbose lifecycle #~dev: CWD: C:\Users\osama\OneDrive\Desktop\calculator workflow
10 silly lifecycle #~dev: Args: [ '/d /s /c', 'node ./scripts/task-runner/tasks.js serve' ]
11 silly lifecycle #~dev: Returned: code: 1 signal: null
12 info lifecycle #~dev: Failed to exec dev script
13 verbose stack Error: # dev: `node ./scripts/task-runner/tasks.js serve`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\osama\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\osama\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid #
15 verbose cwd C:\Users\osama\OneDrive\Desktop\calculator workflow
16 verbose Windows_NT 10.0.22000
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\osama\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v14.16.1
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 1
22 error # dev: `node ./scripts/task-runner/tasks.js serve`
22 error Exit status 1
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 [ 1, true ]
I didn't understand why this happen in windows only and works fine for Linux with track changes and the server never stopped.

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.

Electron.js not working

I'm use vue.js + nuxt.js + electron
I'm installing nuxt.js and electron.js fully
After creating new project with help command vue init nuxt-community/electron-template my-project
i run npm run dev, end see next error in the logs
10 silly lifecycle planster#1.0.0~dev: Args: [ '/d /s /c', 'cross-env NODE_ENV=DEV electron .' ]
11 silly lifecycle planster#1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle planster#1.0.0~dev: Failed to exec dev script
13 verbose stack Error: planster#1.0.0 dev: `cross-env NODE_ENV=DEV electron .`
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 planster#1.0.0
15 verbose cwd E:\PROJECTS\PLANSTER\PRODUCTIONS\DESCKTOP\planster
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" "dev"
18 verbose node v8.11.1
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error planster#1.0.0 dev: `cross-env NODE_ENV=DEV electron .`
22 error Exit status 1
23 error Failed at the planster#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'm use win7. How to solve my problem?

Angularjs 2 Quickstart - Npm run error

I have tried the angular2 5 Min quickstart from https://angular.io/guide/quickstart. All files were created by copy & paste because i am lazy and because of possible faults. I preferred the TypeScript version. At the end, i must compile and start with "npm start". I do this as admin. my OS is Windows 10.
After start, I get some errors. this is the 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 'start' ]
2 info using npm#2.9.1
3 info using node#v0.12.3
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart angular2-quickstart#1.0.0
7 info start angular2-quickstart#1.0.0
8 verbose unsafe-perm in lifecycle true
9 info angular2-quickstart#1.0.0 Failed to exec start script
10 verbose stack Error: angular2-quickstart#1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
10 verbose stack Exit status 2
10 verbose stack at EventEmitter.<anonymous> (C:\Program Files\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.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
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 angular2-quickstart#1.0.0
12 verbose cwd C:\web\angular2-quickstart
13 error Windows_NT 6.3.9600
14 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
15 error node v0.12.3
16 error npm v2.9.1
17 error code ELIFECYCLE
18 error angular2-quickstart#1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
18 error Exit status 2
19 error Failed at the angular2-quickstart#1.0.0 start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '.
19 error This is most likely a problem with the angular2-quickstart package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error tsc && concurrently "npm run tsc:w" "npm run lite"
19 error You can get their info via:
19 error npm owner ls angular2-quickstart
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]
Can anybody help me get the quickstart app to start?
I also tried to start the index.html in Firefox ( because the .ts files are all translated in .js files ) but nothing happens.
Sorry, my fault. the file app.component.ts was empty. i filled it with the correct content and "run npm start" and it works. the lite browser starts, i see "My first Angular 2 App" and i will be happy until the end of my days.

Can't start Node js server in the example application of Angular

I downloaded Angular phonecat example phoject, moved to this directory and tried 'npm start' command. Result:
0 info it worked if it ends with ok
1 verbose cli [ 'node',
1 verbose cli '/usr/local/Cellar/nvm/0.17.2/v0.10.32/bin/npm',
1 verbose cli 'start' ]
2 info using npm#2.1.4
3 info using node#v0.10.32
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart angular-phonecat#0.0.0
6 verbose unsafe-perm in lifecycle true
7 info angular-phonecat#0.0.0 Failed to exec prestart script
8 verbose stack Error: angular-phonecat#0.0.0 prestart: `npm install`
8 verbose stack Exit status 3
8 verbose stack at ChildProcess.<anonymous> (/usr/local/Cellar/nvm/0.17.2/v0.10.32/lib/node_modules/npm/lib/utils/lifecycle.js:212:16)
8 verbose stack at ChildProcess.emit (events.js:98:17)
8 verbose stack at maybeClose (child_process.js:756:16)
8 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:823:5)
9 verbose pkgid angular-phonecat#0.0.0
10 verbose cwd /Users/marya/JS:HTML:CSS/angular-phonecat
11 error Darwin 13.4.0
12 error argv "node" "/usr/local/Cellar/nvm/0.17.2/v0.10.32/bin/npm" "start"
13 error node v0.10.32
14 error npm v2.1.4
15 error code ELIFECYCLE
16 error angular-phonecat#0.0.0 prestart: `npm install`
16 error Exit status 3
17 error Failed at the angular-phonecat#0.0.0 prestart script.
17 error This is most likely a problem with the angular-phonecat package,
17 error not with npm itself.
17 error Tell the author that this fails on your system:
17 error npm install
17 error You can get their info via:
17 error npm owner ls angular-phonecat
17 error There is likely additional logging output above.
18 verbose exit [ 1, true ]
I don't understand why but I can't execute server. How can I fix it? Thanks in advance.
It seems node is installed with version node#v0.10.32
Anyhow, what really happens is that npm looks in your package.json file, and if you have something like
"scripts": { "start": "coffee server.coffee" } }
then it will do that. If npm can't find your start script, it will not work
try node start using
node <name of your node server>.js
and error seen in your angular-phonecat Try reinstalling it using npm command and try.

Categories