Seem to have this problem even if i reinstalled it, deleted node-modules/package-lock.json/ downgraded to a earlier version
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Users\\Shaimz\\Desktop\\work\\Programs\\node.exe',
1 verbose cli 'C:\\Users\\Shaimz\\Desktop\\work\\Programs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm#6.9.0
3 info using node#v10.16.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle my-app#1.0.0~prebuild: my-app#1.0.0
6 info lifecycle my-app#1.0.0~build: my-app#1.0.0
7 verbose lifecycle my-app#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle my-app#1.0.0~build: PATH: C:\Users\Shaimz\Desktop\work\Programs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Shaimz\Desktop\work\node\my-app\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files\010 Editor;C:\FPC\3.0.4\bin\i386-Win32;D:\Programs\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Users\Shaimz\Desktop\work\Programs\;D:\Programs\Microsoft VS Code\bin;C:\Users\Shaimz\AppData\Local\GitHubDesktop\bin;C:\Users\Shaimz\AppData\Roaming\npm
9 verbose lifecycle my-app#1.0.0~build: CWD: C:\Users\Shaimz\Desktop\work\node\my-app
10 silly lifecycle my-app#1.0.0~build: Args: [ '/d /s /c', 'webpack' ]
11 silly lifecycle my-app#1.0.0~build: Returned: code: 1 signal: null
12 info lifecycle my-app#1.0.0~build: Failed to exec build script
13 verbose stack Error: my-app#1.0.0 build: `webpack`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Shaimz\Desktop\work\Programs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Shaimz\Desktop\work\Programs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid my-app#1.0.0
15 verbose cwd C:\Users\Shaimz\Desktop\work\node\my-app
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Users\\Shaimz\\Desktop\\work\\Programs\\node.exe" "C:\\Users\\Shaimz\\Desktop\\work\\Programs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v10.16.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error my-app#1.0.0 build: `webpack`
22 error Exit status 1
23 error Failed at the my-app#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
WEBPACK config right here :
var React = require('react');
var ReactDOM = require('react-dom');
var App = require('./components/App');
ReactDOM.render(
<App/>,
document.getElementById('app')
);
var HTMLWebpackPlugin = require('html-webpack-plugin');
var HTMLWebpackPluginConfig = new HTMLWebpackPlugin({
template: __dirname + '/app/index.html',
filename:'index.html',
inject:'head'
});
module.exports = {
entry: ['./app/index.js'],
module:{
loaders:[
{
test: /\.js$/,
exclude: /node_modules/,
loader:'babel-loader'
}
]
},
output:{
path:__dirname + '/build',
filename:'file.js'
},
plugins:[HTMLWebpackPluginConfig]
};
I think that's the formated code , sorry , i'm new to stackoverflow.I wish you could help me with that problem , i was starting to think maybe i do something wrong but i dont think soo , i was watching carefully a guide on codecademy
Related
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!
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.
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
Please see the below files for reference. I am not able to start the npm start command while creating set up for react demo project.
**package.json**
{
"name": "package.json",
"version": "1.0.0",
"description": "Demo application",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --hot"
},
"author": "Abhishek",
"license": "ISC",
"dependencies": {
"react": "^15.4.2",
"react-dom": "^15.4.2"
}
}
Webpack.config.js
var config = {
entry: './main.js',
output: {
path:'./',
filename: 'index.js',
},
devServer: {
inline: true,
port: 8080
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015', 'react']
}
}
]
}
}
module.exports = config;
Please find the below logs when I ran npm.start
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.15.1
3 info using node#v4.4.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart package.json#1.0.0
6 info start package.json#1.0.0
7 verbose unsafe-perm in lifecycle true
8 info package.json#1.0.0 Failed to exec start script
9 verbose stack Error: package.json#1.0.0 start: `webpack-dev-server --hot`
9 verbose stack Exit status 1
9 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:217:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:827:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid package.json#1.0.0
11 verbose cwd C:\Users\abhishek_pal02\Desktop\reactApp
12 error Windows_NT 6.3.9600
13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
14 error node v4.4.4
15 error npm v2.15.1
16 error code ELIFECYCLE
17 error package.json#1.0.0 start: `webpack-dev-server --hot`
17 error Exit status 1
18 error Failed at the package.json#1.0.0 start script 'webpack-dev-server --hot'.
18 error This is most likely a problem with the package.json package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error webpack-dev-server --hot
18 error You can get information on how to open an issue for this project with:
18 error npm bugs package.json
18 error Or if that isn't available, you can get their info via:
18 error
18 error npm owner ls package.json
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
Please help to solve this error. Thanks in advance.
-Abhishek
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});