<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
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\\Dev\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using
[email protected]
3 info using
[email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle
[email protected]~prestart:
[email protected]
6 info lifecycle
[email protected]~start:
[email protected]
7 verbose lifecycle
[email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle
[email protected]~start: PATH: C:\Users\Dev\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Dev\Desktop\Fetch api\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python38\Scripts\;C:\Python38\;C:\Program Files (x86)\Intel\TXE Components\iCLS\;C:\Program Files\Intel\TXE Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Intel\TXE Components\DAL\;C:\Program Files (x86)\Intel\TXE Components\DAL\;C:\Program Files\Intel\TXE Components\IPT\;C:\Program Files (x86)\Intel\TXE Components\IPT\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Users\Dev\AppData\Local\Microsoft\WindowsApps;;C:\Users\Dev\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Dev\AppData\Roaming\npm
9 verbose lifecycle
[email protected]~start: CWD: C:\Users\Dev\Desktop\Fetch api
10 silly lifecycle
[email protected]~start: Args: [ '/d /s /c', 'node scripts.js' ]
11 silly lifecycle
[email protected]~start: Returned: code: 1 signal: null
12 info lifecycle
[email protected]~start: Failed to exec start script
13 verbose stack Error:
[email protected] start: `node scripts.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Dev\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:310:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Dev\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:310:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid
[email protected]
15 verbose cwd C:\Users\Dev\Desktop\Fetch api
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Dev\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.16.3
19 verbose npm v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error
[email protected] start: `node scripts.js`
22 error Exit status 1
23 error Failed at the
[email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
<!-- end snippet -->
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
PS C:\Users\Dev\Desktop\Fetch api> npm start
>
[email protected] start C:\Users\Dev\Desktop\Fetch api
> node scripts.js
C:\Users\Dev\Desktop\Fetch api\scripts.js:1
var button = document.querySelector('.button')
^
ReferenceError: document is not defined
at Object.<anonymous> (C:\Users\Dev\Desktop\Fetch api\scripts.js:1:14)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR!
[email protected] start: `node scripts.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the
[email protected] start 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\Dev\AppData\Roaming\npm-cache\_logs\2020-05-23T18_39_34_693Z-debug.log
<!-- end snippet -->
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
PACKAGE JSON
{
"name": "np",
"version": "1.0.0",
"main": "script.js",
"scripts": {
"start": "node scripts.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"npm": "^6.14.5",
"prpl-server": "^1.4.0"
},
"devDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/mendesbayout/Fetch-api-simple-forecast.git"
},
"bugs": {
"url": "https://github.com/mendesbayout/Fetch-api-simple-forecast/issues"
},
"homepage": "https://github.com/mendesbayout/Fetch-api-simple-forecast#readme",
"description": ""
}
<!-- end snippet -->