What should I set my “start” script to in NPM package.json?
up vote
1
down vote
favorite
I'm unable to run npm start
because I don't have a "start" script in my package.json. The problem is, I don't know what to enter there. How do I find out what I should set my start script to? I've tried various values like "start": "node app.js" and "start": "node server.js" but they haven't worked.
This is the debug log when I try npm start
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.4.1
3 info using node@v11.1.0
4 verbose config Skipping project config: C:UsersAristophanes/.npmrc. (matches userconfig)
5 verbose stack Error: missing script: start
5 verbose stack at run (C:Program Filesnodejsnode_modulesnpmlibrun-script.js:155:19)
5 verbose stack at C:Program Filesnodejsnode_modulesnpmlibrun-script.js:63:5
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:115:5
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:418:5
5 verbose stack at handleExists (C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:382:20)
5 verbose stack at fs.stat (C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:390:33)
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesgraceful-fspolyfills.js:284:29
5 verbose stack at FSReqCallback.oncomplete (fs.js:161:21)
6 verbose cwd C:UsersAristophanes
7 verbose Windows_NT 10.0.17134
8 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
9 verbose node v11.1.0
10 verbose npm v6.4.1
11 error missing script: start
12 verbose exit [ 1, true ]
Update: I now have "start": "node.js" in my scripts section of package.json. When I try npm start
now I get this in error log:
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.4.1
3 info using node@v11.1.0
4 verbose config Skipping project config: C:UsersAristophanes/.npmrc. (matches userconfig)
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info lifecycle npm@6.4.1~prestart: npm@6.4.1
7 verbose lifecycle npm@6.4.1~prestart: unsafe-perm in lifecycle true
8 verbose lifecycle npm@6.4.1~prestart: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:UsersAristophanesnode_modules.bin;C:Program Filescmderbin;C:Program Filescmdervendorconemu-maximus5ConEmuScripts;C:Program Filescmdervendorconemu-maximus5;C:Program Filescmdervendorconemu-maximus5ConEmu;C:Program Filesnodejs;C:UsersAristophanesAppDataRoamingnpm;C:ProgramDataBoxstarter;C:Python27;C:Python27Scripts;C:Program FilesMicrosoft MPIBin;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Gobin;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:UsersAristophanesGobin;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersAristophanesAppDataLocalProgramsPythonPython37;C:UsersAristophanesAppDataLocalProgramsPythonPython37Scripts;C:Program Filesdotnet;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:PHP;C:ProgramDatachocolateybin;C:Program FilesGeth;C:HashiCorpVagrantbin;C:Program FilesGitcmd;C:composer;C:Program Filesnodejs;C:Program FilesGitmingw64;C:Program FilesGitusrbin;C:Program Filescmder
9 verbose lifecycle npm@6.4.1~prestart: CWD: C:UsersAristophanes
10 silly lifecycle npm@6.4.1~prestart: Args: [ '-c', 'npm install' ]
11 silly lifecycle npm@6.4.1~prestart: Returned: code: 1 signal: null
12 info lifecycle npm@6.4.1~prestart: Failed to exec prestart script
13 verbose stack Error: npm@6.4.1 prestart: `npm install`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
14 verbose pkgid npm@6.4.1
15 verbose cwd C:UsersAristophanes
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 v11.1.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error npm@6.4.1 prestart: `npm install`
22 error Exit status 1
23 error Failed at the npm@6.4.1 prestart script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
node.js json npm package node-modules
|
show 2 more comments
up vote
1
down vote
favorite
I'm unable to run npm start
because I don't have a "start" script in my package.json. The problem is, I don't know what to enter there. How do I find out what I should set my start script to? I've tried various values like "start": "node app.js" and "start": "node server.js" but they haven't worked.
This is the debug log when I try npm start
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.4.1
3 info using node@v11.1.0
4 verbose config Skipping project config: C:UsersAristophanes/.npmrc. (matches userconfig)
5 verbose stack Error: missing script: start
5 verbose stack at run (C:Program Filesnodejsnode_modulesnpmlibrun-script.js:155:19)
5 verbose stack at C:Program Filesnodejsnode_modulesnpmlibrun-script.js:63:5
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:115:5
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:418:5
5 verbose stack at handleExists (C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:382:20)
5 verbose stack at fs.stat (C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:390:33)
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesgraceful-fspolyfills.js:284:29
5 verbose stack at FSReqCallback.oncomplete (fs.js:161:21)
6 verbose cwd C:UsersAristophanes
7 verbose Windows_NT 10.0.17134
8 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
9 verbose node v11.1.0
10 verbose npm v6.4.1
11 error missing script: start
12 verbose exit [ 1, true ]
Update: I now have "start": "node.js" in my scripts section of package.json. When I try npm start
now I get this in error log:
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.4.1
3 info using node@v11.1.0
4 verbose config Skipping project config: C:UsersAristophanes/.npmrc. (matches userconfig)
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info lifecycle npm@6.4.1~prestart: npm@6.4.1
7 verbose lifecycle npm@6.4.1~prestart: unsafe-perm in lifecycle true
8 verbose lifecycle npm@6.4.1~prestart: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:UsersAristophanesnode_modules.bin;C:Program Filescmderbin;C:Program Filescmdervendorconemu-maximus5ConEmuScripts;C:Program Filescmdervendorconemu-maximus5;C:Program Filescmdervendorconemu-maximus5ConEmu;C:Program Filesnodejs;C:UsersAristophanesAppDataRoamingnpm;C:ProgramDataBoxstarter;C:Python27;C:Python27Scripts;C:Program FilesMicrosoft MPIBin;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Gobin;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:UsersAristophanesGobin;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersAristophanesAppDataLocalProgramsPythonPython37;C:UsersAristophanesAppDataLocalProgramsPythonPython37Scripts;C:Program Filesdotnet;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:PHP;C:ProgramDatachocolateybin;C:Program FilesGeth;C:HashiCorpVagrantbin;C:Program FilesGitcmd;C:composer;C:Program Filesnodejs;C:Program FilesGitmingw64;C:Program FilesGitusrbin;C:Program Filescmder
9 verbose lifecycle npm@6.4.1~prestart: CWD: C:UsersAristophanes
10 silly lifecycle npm@6.4.1~prestart: Args: [ '-c', 'npm install' ]
11 silly lifecycle npm@6.4.1~prestart: Returned: code: 1 signal: null
12 info lifecycle npm@6.4.1~prestart: Failed to exec prestart script
13 verbose stack Error: npm@6.4.1 prestart: `npm install`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
14 verbose pkgid npm@6.4.1
15 verbose cwd C:UsersAristophanes
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 v11.1.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error npm@6.4.1 prestart: `npm install`
22 error Exit status 1
23 error Failed at the npm@6.4.1 prestart script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
node.js json npm package node-modules
I think yourpackage.json
is not in a correct format. Its sayingError: missing script: start
while you have written that you have specified start script.
– vibhor1997a
Nov 10 at 7:06
I have tried writing "start" scripts but they havent worked so I currently have none set. I'm asking what I should set the "start" script to..
– Aristophanes
Nov 10 at 7:10
The log you should add is when you have specified start scripts like above. You may trynode .
as script.
– vibhor1997a
Nov 10 at 7:12
Please see the update to this question, I have added the relevant log now, thanks
– Aristophanes
Nov 10 at 7:22
What do u want to happen when u run the command, specifically?
– Sello Mkantjwa
Nov 10 at 9:20
|
show 2 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm unable to run npm start
because I don't have a "start" script in my package.json. The problem is, I don't know what to enter there. How do I find out what I should set my start script to? I've tried various values like "start": "node app.js" and "start": "node server.js" but they haven't worked.
This is the debug log when I try npm start
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.4.1
3 info using node@v11.1.0
4 verbose config Skipping project config: C:UsersAristophanes/.npmrc. (matches userconfig)
5 verbose stack Error: missing script: start
5 verbose stack at run (C:Program Filesnodejsnode_modulesnpmlibrun-script.js:155:19)
5 verbose stack at C:Program Filesnodejsnode_modulesnpmlibrun-script.js:63:5
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:115:5
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:418:5
5 verbose stack at handleExists (C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:382:20)
5 verbose stack at fs.stat (C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:390:33)
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesgraceful-fspolyfills.js:284:29
5 verbose stack at FSReqCallback.oncomplete (fs.js:161:21)
6 verbose cwd C:UsersAristophanes
7 verbose Windows_NT 10.0.17134
8 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
9 verbose node v11.1.0
10 verbose npm v6.4.1
11 error missing script: start
12 verbose exit [ 1, true ]
Update: I now have "start": "node.js" in my scripts section of package.json. When I try npm start
now I get this in error log:
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.4.1
3 info using node@v11.1.0
4 verbose config Skipping project config: C:UsersAristophanes/.npmrc. (matches userconfig)
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info lifecycle npm@6.4.1~prestart: npm@6.4.1
7 verbose lifecycle npm@6.4.1~prestart: unsafe-perm in lifecycle true
8 verbose lifecycle npm@6.4.1~prestart: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:UsersAristophanesnode_modules.bin;C:Program Filescmderbin;C:Program Filescmdervendorconemu-maximus5ConEmuScripts;C:Program Filescmdervendorconemu-maximus5;C:Program Filescmdervendorconemu-maximus5ConEmu;C:Program Filesnodejs;C:UsersAristophanesAppDataRoamingnpm;C:ProgramDataBoxstarter;C:Python27;C:Python27Scripts;C:Program FilesMicrosoft MPIBin;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Gobin;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:UsersAristophanesGobin;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersAristophanesAppDataLocalProgramsPythonPython37;C:UsersAristophanesAppDataLocalProgramsPythonPython37Scripts;C:Program Filesdotnet;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:PHP;C:ProgramDatachocolateybin;C:Program FilesGeth;C:HashiCorpVagrantbin;C:Program FilesGitcmd;C:composer;C:Program Filesnodejs;C:Program FilesGitmingw64;C:Program FilesGitusrbin;C:Program Filescmder
9 verbose lifecycle npm@6.4.1~prestart: CWD: C:UsersAristophanes
10 silly lifecycle npm@6.4.1~prestart: Args: [ '-c', 'npm install' ]
11 silly lifecycle npm@6.4.1~prestart: Returned: code: 1 signal: null
12 info lifecycle npm@6.4.1~prestart: Failed to exec prestart script
13 verbose stack Error: npm@6.4.1 prestart: `npm install`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
14 verbose pkgid npm@6.4.1
15 verbose cwd C:UsersAristophanes
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 v11.1.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error npm@6.4.1 prestart: `npm install`
22 error Exit status 1
23 error Failed at the npm@6.4.1 prestart script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
node.js json npm package node-modules
I'm unable to run npm start
because I don't have a "start" script in my package.json. The problem is, I don't know what to enter there. How do I find out what I should set my start script to? I've tried various values like "start": "node app.js" and "start": "node server.js" but they haven't worked.
This is the debug log when I try npm start
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.4.1
3 info using node@v11.1.0
4 verbose config Skipping project config: C:UsersAristophanes/.npmrc. (matches userconfig)
5 verbose stack Error: missing script: start
5 verbose stack at run (C:Program Filesnodejsnode_modulesnpmlibrun-script.js:155:19)
5 verbose stack at C:Program Filesnodejsnode_modulesnpmlibrun-script.js:63:5
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:115:5
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:418:5
5 verbose stack at handleExists (C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:382:20)
5 verbose stack at fs.stat (C:Program Filesnodejsnode_modulesnpmnode_modulesread-package-jsonread-json.js:390:33)
5 verbose stack at C:Program Filesnodejsnode_modulesnpmnode_modulesgraceful-fspolyfills.js:284:29
5 verbose stack at FSReqCallback.oncomplete (fs.js:161:21)
6 verbose cwd C:UsersAristophanes
7 verbose Windows_NT 10.0.17134
8 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
9 verbose node v11.1.0
10 verbose npm v6.4.1
11 error missing script: start
12 verbose exit [ 1, true ]
Update: I now have "start": "node.js" in my scripts section of package.json. When I try npm start
now I get this in error log:
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.4.1
3 info using node@v11.1.0
4 verbose config Skipping project config: C:UsersAristophanes/.npmrc. (matches userconfig)
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info lifecycle npm@6.4.1~prestart: npm@6.4.1
7 verbose lifecycle npm@6.4.1~prestart: unsafe-perm in lifecycle true
8 verbose lifecycle npm@6.4.1~prestart: PATH: C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclenode-gyp-bin;C:UsersAristophanesnode_modules.bin;C:Program Filescmderbin;C:Program Filescmdervendorconemu-maximus5ConEmuScripts;C:Program Filescmdervendorconemu-maximus5;C:Program Filescmdervendorconemu-maximus5ConEmu;C:Program Filesnodejs;C:UsersAristophanesAppDataRoamingnpm;C:ProgramDataBoxstarter;C:Python27;C:Python27Scripts;C:Program FilesMicrosoft MPIBin;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Gobin;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:UsersAristophanesGobin;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersAristophanesAppDataLocalProgramsPythonPython37;C:UsersAristophanesAppDataLocalProgramsPythonPython37Scripts;C:Program Filesdotnet;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:PHP;C:ProgramDatachocolateybin;C:Program FilesGeth;C:HashiCorpVagrantbin;C:Program FilesGitcmd;C:composer;C:Program Filesnodejs;C:Program FilesGitmingw64;C:Program FilesGitusrbin;C:Program Filescmder
9 verbose lifecycle npm@6.4.1~prestart: CWD: C:UsersAristophanes
10 silly lifecycle npm@6.4.1~prestart: Args: [ '-c', 'npm install' ]
11 silly lifecycle npm@6.4.1~prestart: Returned: code: 1 signal: null
12 info lifecycle npm@6.4.1~prestart: Failed to exec prestart script
13 verbose stack Error: npm@6.4.1 prestart: `npm install`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecycleindex.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (C:Program Filesnodejsnode_modulesnpmnode_modulesnpm-lifecyclelibspawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
14 verbose pkgid npm@6.4.1
15 verbose cwd C:UsersAristophanes
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 v11.1.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error npm@6.4.1 prestart: `npm install`
22 error Exit status 1
23 error Failed at the npm@6.4.1 prestart script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
node.js json npm package node-modules
node.js json npm package node-modules
edited Nov 10 at 7:22
asked Nov 10 at 7:02
Aristophanes
237
237
I think yourpackage.json
is not in a correct format. Its sayingError: missing script: start
while you have written that you have specified start script.
– vibhor1997a
Nov 10 at 7:06
I have tried writing "start" scripts but they havent worked so I currently have none set. I'm asking what I should set the "start" script to..
– Aristophanes
Nov 10 at 7:10
The log you should add is when you have specified start scripts like above. You may trynode .
as script.
– vibhor1997a
Nov 10 at 7:12
Please see the update to this question, I have added the relevant log now, thanks
– Aristophanes
Nov 10 at 7:22
What do u want to happen when u run the command, specifically?
– Sello Mkantjwa
Nov 10 at 9:20
|
show 2 more comments
I think yourpackage.json
is not in a correct format. Its sayingError: missing script: start
while you have written that you have specified start script.
– vibhor1997a
Nov 10 at 7:06
I have tried writing "start" scripts but they havent worked so I currently have none set. I'm asking what I should set the "start" script to..
– Aristophanes
Nov 10 at 7:10
The log you should add is when you have specified start scripts like above. You may trynode .
as script.
– vibhor1997a
Nov 10 at 7:12
Please see the update to this question, I have added the relevant log now, thanks
– Aristophanes
Nov 10 at 7:22
What do u want to happen when u run the command, specifically?
– Sello Mkantjwa
Nov 10 at 9:20
I think your
package.json
is not in a correct format. Its saying Error: missing script: start
while you have written that you have specified start script.– vibhor1997a
Nov 10 at 7:06
I think your
package.json
is not in a correct format. Its saying Error: missing script: start
while you have written that you have specified start script.– vibhor1997a
Nov 10 at 7:06
I have tried writing "start" scripts but they havent worked so I currently have none set. I'm asking what I should set the "start" script to..
– Aristophanes
Nov 10 at 7:10
I have tried writing "start" scripts but they havent worked so I currently have none set. I'm asking what I should set the "start" script to..
– Aristophanes
Nov 10 at 7:10
The log you should add is when you have specified start scripts like above. You may try
node .
as script.– vibhor1997a
Nov 10 at 7:12
The log you should add is when you have specified start scripts like above. You may try
node .
as script.– vibhor1997a
Nov 10 at 7:12
Please see the update to this question, I have added the relevant log now, thanks
– Aristophanes
Nov 10 at 7:22
Please see the update to this question, I have added the relevant log now, thanks
– Aristophanes
Nov 10 at 7:22
What do u want to happen when u run the command, specifically?
– Sello Mkantjwa
Nov 10 at 9:20
What do u want to happen when u run the command, specifically?
– Sello Mkantjwa
Nov 10 at 9:20
|
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
please try to write start
inside scripts
by giving a path to your server file.
"start": "node ./index.js",
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
please try to write start
inside scripts
by giving a path to your server file.
"start": "node ./index.js",
add a comment |
up vote
0
down vote
please try to write start
inside scripts
by giving a path to your server file.
"start": "node ./index.js",
add a comment |
up vote
0
down vote
up vote
0
down vote
please try to write start
inside scripts
by giving a path to your server file.
"start": "node ./index.js",
please try to write start
inside scripts
by giving a path to your server file.
"start": "node ./index.js",
edited Nov 10 at 22:55
answered Nov 10 at 15:54
Jawad Akram
12
12
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53236747%2fwhat-should-i-set-my-start-script-to-in-npm-package-json%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think your
package.json
is not in a correct format. Its sayingError: missing script: start
while you have written that you have specified start script.– vibhor1997a
Nov 10 at 7:06
I have tried writing "start" scripts but they havent worked so I currently have none set. I'm asking what I should set the "start" script to..
– Aristophanes
Nov 10 at 7:10
The log you should add is when you have specified start scripts like above. You may try
node .
as script.– vibhor1997a
Nov 10 at 7:12
Please see the update to this question, I have added the relevant log now, thanks
– Aristophanes
Nov 10 at 7:22
What do u want to happen when u run the command, specifically?
– Sello Mkantjwa
Nov 10 at 9:20