Why I can't install packages with npm? - node.js

Trying simple command npm i --legacy-peer-deps and this is what i get:
1474 verbose type system
1475 verbose stack FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/#nrwl%2freact: 12620:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677:
1475 verbose stack
1475 verbose stack at C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\body.js:168:15
1475 verbose stack at processTicksAndRejections (internal/process/task_queues.js:95:5)
1475 verbose stack at async RegistryFetcher.packument (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\registry.js:99:25)
1475 verbose stack at async RegistryFetcher.manifest (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\registry.js:124:23)
1475 verbose stack at async Arborist.[nodeFromEdge] (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\bui ld-ideal-tree.js:1107:19)
1475 verbose stack at async Arborist.[buildDepStep] (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\bui ld-ideal-tree.js:976:11)
1475 verbose stack at async Arborist.buildIdealTree (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\bui ld-ideal-tree.js:218:7)
1475 verbose stack at async Promise.all (index 1)
1475 verbose stack at async Arborist.reify (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\#npmcli\arborist\lib\arborist\reify.js:154:5)
1475 verbose stack at async Install.exec (C:\Users\User\AppData\Roaming\npm\node_modules\npm\lib\commands\install.js:145:5)
1476 verbose cwd D:\Samir\Projects\GO\gomango-next
1477 verbose Windows_NT 10.0.19044
1478 verbose node v14.19.3
1479 verbose npm v8.16.0
1480 error code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
1481 error errno ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
1482 error Invalid response body while trying to fetch https://registry.npmjs.org/#nrwl%2freact: 12620:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677:
1482 error
1483 verbose exit 1
1484 timing npm Completed in 33810ms
1485 verbose unfinished npm timer reify 1660050096991
1486 verbose unfinished npm timer reify:loadTrees 1660050097001
1487 verbose code 1
1488 error A complete log of this run can be found in:
1488 error C:\Users\User\AppData\Local\npm-cache\_logs\2022-08-09T13_01_36_761Z-debug-0.log
node version: 14.19.3
npm version: 8.16.0
OS: Windows

Related

Install error on Vite project with Svelte

I want to try out svelte, but whenever I try to install all the npm dependencies it just won't work.
Here's the latest log from the npm install command:
358 verbose stack Error: command failed
358 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\#npmcli\promise-spawn\lib\index.js:63:27)
358 verbose stack at ChildProcess.emit (node:events:513:28)
358 verbose stack at maybeClose (node:internal/child_process:1093:16)
358 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
359 verbose pkgid esbuild#0.14.54
360 verbose cwd C:\Users\[name]\Documents\svelte\svelteproject
361 verbose Windows_NT 10.0.19044
362 verbose node v16.17.0
363 verbose npm v8.15.0
364 error code 1
365 error path C:\Users\[name]\Documents\svelte\svelteproject\node_modules\esbuild
366 error command failed
367 error command C:\Windows\system32\cmd.exe /d /s /c C:\Users\[name]\AppData\Local\Temp\postinstall-348afd82.cmd
368 error node:internal/errors:477
368 error ErrorCaptureStackTrace(err);
368 error ^
368 error
368 error <ref *1> Error: spawnSync node ENOENT
368 error at Object.spawnSync (node:internal/child_process:1112:20)
368 error at spawnSync (node:child_process:827:24)
368 error at Object.execFileSync (node:child_process:870:15)
368 error at validateBinaryVersion (C:\Users\[name]\Documents\svelte\svelteproject\node_modules\esbuild\install.js:89:32)
368 error at C:\Users\[name]\Documents\svelte\svelteproject\node_modules\esbuild\install.js:240:5 {
368 error errno: -4058,
368 error code: 'ENOENT',
368 error syscall: 'spawnSync node',
368 error path: 'node',
368 error spawnargs: [
368 error 'C:\\Users\\[name]\\Documents\\svelte\\svelteproject\\node_modules\\esbuild\\bin\\esbuild',
368 error '--version'
368 error ],
368 error error: [Circular *1],
368 error status: null,
368 error signal: null,
368 error output: null,
368 error pid: 0,
368 error stdout: null,
368 error stderr: null
368 error }
369 verbose exit 1
370 timing npm Completed in 8482ms
371 verbose unfinished npm timer reify 1662249334912
372 verbose unfinished npm timer reify:build 1662249342838
373 verbose unfinished npm timer build 1662249342839
374 verbose unfinished npm timer build:deps 1662249342839
375 verbose unfinished npm timer build:run:postinstall 1662249342853
376 verbose unfinished npm timer build:run:postinstall:node_modules/esbuild 1662249342854
377 verbose code 1
378 error A complete log of this run can be found in:
378 error C:\Users\[name]\AppData\Local\npm-cache\_logs\2022-09-03T23_55_34_708Z-debug-0.log
I created the project by running npm init vite and followed all the steps. The only issue arose when I ran the npm install command in the root directory of the project.

Angular Jest testing `Test suite failed to run`

I am not able to get any proper test result from my npm run test.getting this following error. how to fix it?
FAIL src/app/shared-components/services/shared-service.spec.ts
● Test suite failed to run
D:\IBO\Project\IBO-UI\NG-IBO\src\setup-jest.ts:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import 'jest-preset-angular';
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected string
at ScriptTransformer._transformAndBuildScript (node_modules/#jest/transform/build/ScriptTransformer.js:471:17)
at ScriptTransformer.transform (node_modules/#jest/transform/build/ScriptTransformer.js:513:25)
at Array.forEach (<anonymous>)
Any one help me to fix this please?
Here is the log file
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\722333\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test' ]
2 info using npm#6.9.1-next.0
3 info using node#v11.10.0
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle ibo#0.0.0~pretest: ibo#0.0.0
6 info lifecycle ibo#0.0.0~test: ibo#0.0.0
7 verbose lifecycle ibo#0.0.0~test: unsafe-perm in lifecycle true
8 verbose lifecycle ibo#0.0.0~test: PATH: C:\Users\722333\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\IBO\Project\IBO-UI\NG-IBO\node_modules\.bin;C:\Users\722333\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\722333\AppData\Local\Programs\Python\Python37-32\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\722333\AppData\Local\Microsoft\WindowsApps;D:\mongodb\bin;D:\Git\bin;C:\Users\722333\AppData\Local\Programs\Common\Microsoft VS Code\bin;C:\Users\722333\AppData\Roaming\npm;C:\Users\722333\AppData\Local\Programs\Python\Python37-32;
9 verbose lifecycle ibo#0.0.0~test: CWD: D:\IBO\Project\IBO-UI\NG-IBO
10 silly lifecycle ibo#0.0.0~test: Args: [ '/d /s /c', 'jest' ]
11 silly lifecycle ibo#0.0.0~test: Returned: code: 1 signal: null
12 info lifecycle ibo#0.0.0~test: Failed to exec test script
13 verbose stack Error: ibo#0.0.0 test: `jest`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\722333\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:197:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\722333\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:197:13)
13 verbose stack at maybeClose (internal/child_process.js:984:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
14 verbose pkgid ibo#0.0.0
15 verbose cwd D:\IBO\Project\IBO-UI\NG-IBO
16 verbose Windows_NT 10.0.15063
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\722333\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
18 verbose node v11.10.0
19 verbose npm v6.9.1-next.0
20 error code ELIFECYCLE
21 error errno 1
22 error ibo#0.0.0 test: `jest`
22 error Exit status 1
23 error Failed at the ibo#0.0.0 test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Without knowing your jest.config.js file or your global jest configuration I would say that you have not configured you're exposed configuration properly. And more specifically the transform property. It should look like this:
module.exports = {
...
transform: {
"^.+\\.(ts|js|html)$": "ts-jest"
},
};
For further help on the topic read this.
Hope that helps!

node crashes after some HMR trggered

posting the full log saved from framedwork FYI as below, might also be a memory leaking issue??
assert.js:42 throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: false == true
debug log details as below:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node#8/8.12.0/bin/node',
1 verbose cli '/usr/local/opt/node#8/bin/npm',
1 verbose cli 'start' ]
2 info using npm#6.4.1
3 info using node#v8.12.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle wm-admin#0.0.0~prestart: wm-admin#0.0.0
6 verbose lifecycle wm-admin#0.0.0~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle wm-admin#0.0.0~prestart: PATH: /usr/local/Cellar/node#8/8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/usern/Projects/Vri/wm-admin/node_modules/.bin:/usr/local/opt/node#8/bin:/usr/local/opt/node#8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/usern/Projects/i/gopath/bin
8 verbose lifecycle wm-admin#0.0.0~prestart: CWD: /Users/usern/Projects/Vri/wm-admin
9 silly lifecycle wm-admin#0.0.0~prestart: Args: [ '-c', 'npm run versions' ]
10 silly lifecycle wm-admin#0.0.0~prestart: Returned: code: 0 signal: null
11 info lifecycle wm-admin#0.0.0~start: wm-admin#0.0.0
12 verbose lifecycle wm-admin#0.0.0~start: unsafe-perm in lifecycle true
13 verbose lifecycle wm-admin#0.0.0~start: PATH: /usr/local/Cellar/node#8/8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/user/Projects/Vi/wm-admin/node_modules/.bin:/usr/local/opt/node#8/bin:/usr/local/opt/node#8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/quin/Projects/Viri/gopath/bin
14 verbose lifecycle wm-admin#0.0.0~start: CWD: /Users/quin/Projects/Viri/wm-admin
15 silly lifecycle wm-admin#0.0.0~start: Args: [ '-c',
15 silly lifecycle 'ng serve --ssl --host 0.0.0.0 --port 4200 --proxy-config proxies/proxy.test.conf.json' ]
16 silly lifecycle wm-admin#0.0.0~start: Returned: code: 1 signal: null
17 info lifecycle wm-admin#0.0.0~start: Failed to exec start script
18 verbose stack Error: wm-admin#0.0.0 start: `ng serve --ssl --host 0.0.0.0 --port 4200 --proxy-config proxies/proxy.test.conf.json`
18 verbose stack Exit status 1
18 verbose stack at EventEmitter.<anonymous> (/usr/local/Cellar/node#8/8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
18 verbose stack at emitTwo (events.js:126:13)
18 verbose stack at EventEmitter.emit (events.js:214:7)
18 verbose stack at ChildProcess.<anonymous> (/usr/local/Cellar/node#8/8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
18 verbose stack at emitTwo (events.js:126:13)
18 verbose stack at ChildProcess.emit (events.js:214:7)
18 verbose stack at maybeClose (internal/child_process.js:915:16)
18 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
19 verbose pkgid wm-admin#0.0.0
20 verbose cwd /Users/quin/Projects/Vi/wm-admin
21 verbose Darwin 18.2.0
22 verbose argv "/usr/local/Cellar/node#8/8.12.0/bin/node" "/usr/local/opt/node#8/bin/npm" "start"
23 verbose node v8.12.0
24 verbose npm v6.4.1
25 error code ELIFECYCLE
26 error errno 1
27 error wm-admin#0.0.0 start: `ng serve --ssl --host 0.0.0.0 --port 4200 --proxy-config proxies/proxy.test.conf.json`
27 error Exit status 1
28 error Failed at the wm-admin#0.0.0 start script.
28 error This is probably not a problem with npm. There is likely additional logging output above.
29 verbose exit [ 1, true ]
this might also the problem of a nodejs problem that causing too many calls that crashes the system, tried a lot of googling still no one can explain this.

Cannot run npm run build or npm start

Whenever I try building my web-pack file or starting web-pack dev server I get an error. It was working, but I was messing around with eslint and broke something.
This is the error package when trying npm build
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm#4.5.0
3 info using node#v6.10.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle setup#1.0.0~prebuild: setup#1.0.0
6 silly lifecycle setup#1.0.0~prebuild: no script for prebuild, continuing
7 info lifecycle setup#1.0.0~build: setup#1.0.0
8 verbose lifecycle setup#1.0.0~build: unsafe-perm in lifecycle true
9 verbose lifecycle setup#1.0.0~build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/Nims/Documents/Web Development/Projects/React bookstore/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle setup#1.0.0~build: CWD: /Users/Nims/Documents/Web Development/Projects/React bookstore
11 silly lifecycle setup#1.0.0~build: Args: [ '-c', 'webpack' ]
12 silly lifecycle setup#1.0.0~build: Returned: code: 1 signal: null
13 info lifecycle setup#1.0.0~build: Failed to exec build script
14 verbose stack Error: setup#1.0.0 build: `webpack`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279: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.<anonymous> (/usr/local/lib/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:886:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid setup#1.0.0
16 verbose cwd /Users/Nims/Documents/Web Development/Projects/React bookstore
17 verbose Darwin 16.5.0
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
19 verbose node v6.10.3
20 verbose npm v4.5.0
21 error code ELIFECYCLE
22 error errno 1
23 error setup#1.0.0 build: `webpack`
23 error Exit status 1
24 error Failed at the setup#1.0.0 build script 'webpack'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the setup package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error webpack
24 error You can get information on how to open an issue for this project with:
24 error npm bugs setup
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls setup
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]
and when trying npm start
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm#4.5.0
3 info using node#v6.10.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle setup#1.0.0~prestart: setup#1.0.0
6 silly lifecycle setup#1.0.0~prestart: no script for prestart, continuing
7 info lifecycle setup#1.0.0~start: setup#1.0.0
8 verbose lifecycle setup#1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle setup#1.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/Nims/Documents/Web Development/Projects/React bookstore/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle setup#1.0.0~start: CWD: /Users/Nims/Documents/Web Development/Projects/React bookstore
11 silly lifecycle setup#1.0.0~start: Args: [ '-c', 'webpack-dev-server' ]
12 silly lifecycle setup#1.0.0~start: Returned: code: 1 signal: null
13 info lifecycle setup#1.0.0~start: Failed to exec start script
14 verbose stack Error: setup#1.0.0 start: `webpack-dev-server`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279: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.<anonymous> (/usr/local/lib/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:886:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid setup#1.0.0
16 verbose cwd /Users/Nims/Documents/Web Development/Projects/React bookstore
17 verbose Darwin 16.5.0
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
19 verbose node v6.10.3
20 verbose npm v4.5.0
21 error code ELIFECYCLE
22 error errno 1
23 error setup#1.0.0 start: `webpack-dev-server`
23 error Exit status 1
24 error Failed at the setup#1.0.0 start script 'webpack-dev-server'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the setup package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error webpack-dev-server
24 error You can get information on how to open an issue for this project with:
24 error npm bugs setup
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls setup
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]
Here is my webpack file
module.exports = {
entry: ['babel-polyfill', './app/index.js'],
output: {
path: __dirname + '/build',
// if the above line does not work, try `path: __dirname + '/build'`
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js$/, // a regular expression that catches .js files
exclude: /node_modules/,
loader: ['babel-loader']
}
],
},
devServer: {
port: 3000, // most common port
contentBase: './build',
inline: true
}
};
It seems its not picking up the local scripts in my webpack.config.js file - but I'm new to this and I'm still learning
Try deleting the node_modules, and then run the script.
May not have been installed in npm global and then install them separately and then run the regular npm install without root privileges:
sudo npm install -g coffee-script node-gyp
npm install

i start server success but client connect it have error node.js

i start server success but client connect it have error
https://jsfiddle.net/m9wvm4nu/3/ (in css is file debuglog)
here is file debuglog if u dont need my code in node . I dont know what happening
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\nodejs\\node.exe',
1 verbose cli 'C:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#3.3.12
3 info using node#v5.1.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle simple-website#1.0.0~prestart: simple-website#1.0.0
6 silly lifecycle simple-website#1.0.0~prestart: no script for prestart, continuing
7 info lifecycle simple-website#1.0.0~start: simple-website#1.0.0
8 verbose lifecycle simple-website#1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle simple-website#1.0.0~start: PATH: C:\nodejs\node_modules\npm\bin\node-gyp-bin;D:\1-PROJECT\simple-website\node_modules\.bin;C:\Users\MyPC\bin;C:\Users\MyPC\AppData\Local\Programs\Git\mingw64\bin;C:\Users\MyPC\AppData\Local\Programs\Git\usr\local\bin;C:\Users\MyPC\AppData\Local\Programs\Git\usr\bin;C:\Users\MyPC\AppData\Local\Programs\Git\usr\bin;C:\Users\MyPC\AppData\Local\Programs\Git\mingw64\bin;C:\Users\MyPC\AppData\Local\Programs\Git\usr\bin;C:\Users\MyPC\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Skype\Phone;C:\nodejs;C:\Users\MyPC\AppData\Local\atom\bin;C:\Users\MyPC\AppData\Local\.meteor;C:\Users\MyPC\AppData\Roaming\npm;C:\Users\MyPC\AppData\Local\Programs\Git\cmd;C:\Users\MyPC\AppData\Local\Programs\Git\mingw64\bin;C:\Users\MyPC\AppData\Local\Programs\Git\usr\bin;C:\Users\MyPC\AppData\Local\Programs\Git\usr\bin\vendor_perl;C:\Users\MyPC\AppData\Local\Programs\Git\usr\bin\core_perl
10 verbose lifecycle simple-website#1.0.0~start: CWD: D:\1-PROJECT\simple-website
11 silly lifecycle simple-website#1.0.0~start: Args: [ '/d /s /c', 'node server.js' ]
12 silly lifecycle simple-website#1.0.0~start: Returned: code: 1 signal: null
13 info lifecycle simple-website#1.0.0~start: Failed to exec start script
14 verbose stack Error: simple-website#1.0.0 start: `node server.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\nodejs\node_modules\npm\lib\utils\lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (C:\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:818:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid simple-website#1.0.0
16 verbose cwd D:\1-PROJECT\simple-website
17 error Windows_NT 10.0.10240
18 error argv "C:\\nodejs\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v5.1.0
20 error npm v3.3.12
21 error code ELIFECYCLE
22 error simple-website#1.0.0 start: `node server.js`
22 error Exit status 1
23 error Failed at the simple-website#1.0.0 start script 'node server.js'.
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 simple-website package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node server.js
23 error You can get their info via:
23 error npm owner ls simple-website
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
I'm not sure exactly what is causing your specific error, but this is a problem in your script:
var mineType = mineType[path.extname(fileName).split(".").reverse()[0]];
res.writeHead(200, {'content-Type': mineType});
You can't use the same variable name for your mineType table and for a local variable. Change the local variable to a different variable name:
var type = mineType[path.extname(fileName).split(".").reverse()[0]];
res.writeHead(200, {'content-Type': type});

Resources