Repository navigation
Can't start the server #366
Description
I just downloaded the starter and installed the global dependencies. when I run the server, I get this message:
I'm not sure if it is a local problem or something with the starter.
I'm using windows8
C:\Users\primary\toto>npm run server
angular2-webpack-starter@3.0.0 server C:\Users\primary\toto
npm run server:dev:hmrangular2-webpack-starter@3.0.0 server:dev:hmr C:\Users\primary\toto
npm run server:dev -- --hotangular2-webpack-starter@3.0.0 server:dev C:\Users\primary\toto
webpack-dev-server --inline --progress --profile --colors --watch --display-er
ror-details --display-cached --content-base src/ "--hot"
module.js:338
throw err;
^
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (C:\Users\primary\toto\webpack.config.js:3:15)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (
x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "server:dev" "--" "--hot
"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@3.0.0 server:dev: webpack-dev-server --inline --progress --profile --colors --watch --display-error-details --display-cached --content-base src/ "--hot"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@3.0.0 server:dev script 'webpack
-dev-server --inline --progress --profile --colors --watch --display-error-detai
ls --display-cached --content-base src/ "--hot"'.
npm ERR! This is most likely a problem with the angular2-webpack-starter package
,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --inline --progress --profile --colors --watch -
-display-error-details --display-cached --content-base src/ "--hot"
npm ERR! You can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\primary\toto\npm-debug.log
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (
x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "server:dev:hmr"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@3.0.0 server:dev:hmr: npm run server:dev -- - -hot
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@3.0.0 server:dev:hmr script 'npm
run server:dev -- --hot'.
npm ERR! This is most likely a problem with the angular2-webpack-starter package
,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run server:dev -- --hot
npm ERR! You can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\primary\toto\npm-debug.log
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (
x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "server"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@3.0.0 server: npm run server:dev:hmr
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@3.0.0 server script 'npm run ser
ver:dev:hmr'.
npm ERR! This is most likely a problem with the angular2-webpack-starter package
,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run server:dev:hmr
npm ERR! You can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\primary\toto\npm-debug.log
Activity
PatrickJS commentedon Mar 1, 2016
can you update node to 5+ and npm to 3+ you're currently at node 0.12.7 and npm 2. after you update node you can run the command
npm install -g npm@3to update npmmoaaz-s commentedon Mar 1, 2016
Thax, I just did, but still not working:
C:\Users\primary\toto>npm start
module.js:341
throw err;
^
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object. (C:\Users\primary\toto\webpack.config.js:3:15)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x8
6)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "server:dev" "--" "--hot"
npm ERR! node v5.7.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@3.0.0 server:dev:
webpack-dev-server --inline --progress --profile --colors --watch --display-error-details --display-cached --content-base src/ "--hot"npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@3.0.0 server:dev script 'webpack
-dev-server --inline --progress --profile --colors --watch --display-error-detai
ls --display-cached --content-base src/ "--hot"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-star
ter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --inline --progress --profile --colors --watch -
-display-error-details --display-cached --content-base src/ "--hot"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to in
stall?
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\primary\toto\npm-debug.log
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x8
6)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "server:dev:hmr"
npm ERR! node v5.7.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@3.0.0 server:dev:hmr:
npm run server:dev -- - -hotnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@3.0.0 server:dev:hmr script 'npm
run server:dev -- --hot'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-star
ter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run server:dev -- --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to in
stall?
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\primary\toto\npm-debug.log
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x8
6)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "server"
npm ERR! node v5.7.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@3.0.0 server:
npm run server:dev:hmrnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@3.0.0 server script 'npm run ser
ver:dev:hmr'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-star
ter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run server:dev:hmr
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to in
stall?
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\primary\toto\npm-debug.log
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x8
6)\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v5.7.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@3.0.0 start:
npm run servernpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@3.0.0 start script 'npm run serv
er'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-star
ter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to in
stall?
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\primary\toto\npm-debug.log
PatrickJS commentedon Mar 1, 2016
what about
npm run server:dev?moaaz-s commentedon Mar 1, 2016
same issue!
should I re-install global packages considering that I have upgraded node/npm ? or is it something else?
PatrickJS commentedon Mar 1, 2016
yeah delete node_modules and run npm install again then install all of the globals again
moaaz-s commentedon Mar 1, 2016
While Installing Global Packages, I got the following warnings/errors:
1- WebPack:
npm WARN optional Skipping failed optional dependency /webpack/chokidar/fsevents
:
npm WARN notsup Not compatible with your operating system or architecture: fseve
nts@1.0.8
2. Therefore problem for webpack-dev-server:
npm WARN webpack-dev-server@1.14.1 requires a peer of webpack@>=1.3.0 <3 but non
e was installed.
npm WARN webpack-dev-middleware@1.5.1 requires a peer of webpack@>=1.0.0 <3 but
none was installed.
3. With protractor:
C:\Users\primary\AppData\Roaming\npm\node_modules\protractor\node_modules\utf-8-
validate>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs
\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js"
rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targe
ts(366,5):
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exefailed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files
(x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "reb
uild"
gyp ERR! cwd C:\Users\primary\AppData\Roaming\npm\node_modules\protractor\node_m
odules\utf-8-validate
gyp ERR! node -v v5.7.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install:
node-gyp re buildnpm WARN install:utf-8-validate@1.2.1 Exit status 1
C:\Users\primary\AppData\Roaming\npm
PatrickJS commentedon Mar 13, 2016
@moaaz-s can you pull latest changes and see if it works? I'm going to close this but feel free to open another issue