Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't start the server #366

Closed
moaaz-s opened this issue Mar 1, 2016 · 7 comments
Closed

Can't start the server #366

moaaz-s opened this issue Mar 1, 2016 · 7 comments

Comments

@moaaz-s
Copy link

moaaz-s commented Mar 1, 2016

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:hmr

angular2-webpack-starter@3.0.0 server:dev:hmr C:\Users\primary\toto
npm run server:dev -- --hot

angular2-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

@PatrickJS
Copy link
Owner

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@3 to update npm

@moaaz-s
Copy link
Author

moaaz-s commented Mar 1, 2016

Thax, I just did, but still not working:

C:\Users\primary\toto>npm start

angular2-webpack-starter@3.0.0 start C:\Users\primary\toto
npm run server

angular2-webpack-starter@3.0.0 server C:\Users\primary\toto
npm run server:dev:hmr

angular2-webpack-starter@3.0.0 server:dev:hmr C:\Users\primary\toto
npm run server:dev -- --hot

angular2-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: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 -- - -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! 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: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! 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 server
npm 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
Copy link
Owner

what about npm run server:dev?

@moaaz-s
Copy link
Author

moaaz-s commented Mar 1, 2016

same issue!
should I re-install global packages considering that I have upgraded node/npm ? or is it something else?

@PatrickJS
Copy link
Owner

yeah delete node_modules and run npm install again then install all of the globals again

@moaaz-s
Copy link
Author

moaaz-s commented 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):

warning MSB8003: Could not find WindowsSDKDir variable from the regi
stry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid versi
on number. [C:\Users\primary\AppData\Roaming\npm\node_modules\protractor\node_m
odules\utf-8-validate\build\validation.vcxproj]

TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the
 file specified. [C:\Users\primary\AppData\Roaming\npm\node_modules\protractor\
node_modules\utf-8-validate\build\validation.vcxproj]

gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe fail
ed 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 build
npm WARN install:utf-8-validate@1.2.1 Exit status 1
C:\Users\primary\AppData\Roaming\npm

@PatrickJS
Copy link
Owner

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants