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 ]









share|improve this question























  • 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











  • 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














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 ]









share|improve this question























  • 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











  • 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












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 ]









share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 7:22

























asked Nov 10 at 7:02









Aristophanes

237




237











  • 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











  • 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
















  • 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











  • 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















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












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",






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    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

























    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",






    share|improve this answer


























      up vote
      0
      down vote













      please try to write start inside scripts by giving a path to your server file.



      "start": "node ./index.js",






      share|improve this answer
























        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",






        share|improve this answer














        please try to write start inside scripts by giving a path to your server file.



        "start": "node ./index.js",







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 10 at 22:55

























        answered Nov 10 at 15:54









        Jawad Akram

        12




        12



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Use pre created SQLite database for Android project in kotlin

            Darth Vader #20

            Ondo