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

start up error in sub proj: webpack-dev-server #8

Open
dfparker2002 opened this issue Sep 5, 2016 · 2 comments
Open

start up error in sub proj: webpack-dev-server #8

dfparker2002 opened this issue Sep 5, 2016 · 2 comments

Comments

@dfparker2002
Copy link

Hi, I see the following error after running your recommended init routine. Recommended workarounds or fix?

-- init

git clone https://github.com/simpulton/angular2-website-routes.git
cd angular2-website-routes
npm i
typings install
npm start

-- error

fem-ng2-simple-app@0.0.1 start G:\Workx\angular2-website-routes
webpack-dev-server --inline --colors --watch --display-error-details --display-cached --port 3001 --hot

'webpack-dev-server' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! fem-ng2-simple-app@0.0.1 start: webpack-dev-server --inline --colors --watch --display-error-details --display -cached --port 3001 --hot
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fem-ng2-simple-app@0.0.1 start script.
npm ERR! This is most likely a problem with the fem-ng2-simple-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --inline --colors --watch --display-error-details --display-cached --port 3001 --hot
npm ERR! You can get their info via:
npm ERR! npm owner ls fem-ng2-simple-app
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 10.0.10586
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm
\bin\npm-cli.js" "start"
npm ERR! cwd G:\Workx\angular2-website-routes
npm ERR! node -v v6.5.0
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE

@spencer1573
Copy link

same here. i got it to work with just running
webpack-dev-server.
so weird. I don't know enough to know why that works.

npm start - for some reason it doesn't like that.

@simpulton
Copy link
Owner

@dfparker2002
We just tried a completely clean install of the repo and everything ran smoothly. We also tried legacy versions of node and things still worked so we don't know what the problem is right offhand.

The error indicates that you do not have webpack-dev-server locally, which should not be happening because we have included it in package.json. Please verify that there is a webpack-dev-server directory in the node_modules directory within the project. If there is not, please run npm i webpack-dev-server. If it does exist, continue reading.

While you are running just about the latest version of node, your version of NPM is 1.x, when it should be 3.x. This may be the cause of your problems, so please update NPM to version 3.x.

If that still does not resolve the issue, please try the following:

  1. Remove the node_modules folder from the project
  2. Run npm cache clean in the terminal
  3. Run npm install
  4. Try running the app again

@spencer1573
It looks like you have webpack-dev-server installed globally but not locally. Whenever you run an npm module from within an NPM script, it looks for a version installed locally. But when you run it straight from the command line, it is looking for the global version. Please follow the above steps and let us know what happens.

Thanks!

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

3 participants