Skip to content

Angular CLI App doesn't run after CLI update. #4679

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

Closed
rajinder-yadav opened this issue Feb 13, 2017 · 8 comments
Closed

Angular CLI App doesn't run after CLI update. #4679

rajinder-yadav opened this issue Feb 13, 2017 · 8 comments

Comments

@rajinder-yadav
Copy link

rajinder-yadav commented Feb 13, 2017

Please provide us with the following information:

OS?

linux 4.4.0-62-generic

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

$ ng --version

                             _                           _  _
  __ _  _ __    __ _  _   _ | |  __ _  _ __         ___ | |(_)
 / _` || '_ \  / _` || | | || | / _` || '__|_____  / __|| || |
| (_| || | | || (_| || |_| || || (_| || |  |_____|| (__ | || |
 \__,_||_| |_| \__, | \__,_||_| \__,_||_|          \___||_||_|
               |___/
@angular/cli: 1.0.0-beta.31
node: 7.4.0
os: linux x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/compiler-cli: 2.4.7

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Old app created using CLI doesn't start after CLI update and Angular update to v2.4.7
npm update --save

You can clone this sample-repo and update the app under folder input-output.

I've followed the steps on upgrading from the CLI site.

The log given by the failure.

Normally this include a stack trace and some more information.

input-output: master$ ng s
Cannot find module '@angular/compiler-cli'
Error: Cannot find module '@angular/compiler-cli'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/yadav/.nvm/versions/node/v7.4.0/lib/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/plugin.js:5:24)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/yadav/.nvm/versions/node/v7.4.0/lib/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/index.js:5:10)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/yadav/.nvm/versions/node/v7.4.0/lib/node_modules/@angular/cli/models/webpack-configs/typescript.js:4:19)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/yadav/.nvm/versions/node/v7.4.0/lib/node_modules/@angular/cli/models/webpack-configs/index.js:9:10)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/yadav/.nvm/versions/node/v7.4.0/lib/node_modules/@angular/cli/models/webpack-config.js:4:27)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/yadav/.nvm/versions/node/v7.4.0/lib/node_modules/@angular/cli/tasks/serve.js:10:26)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Class.run (/home/yadav/.nvm/versions/node/v7.4.0/lib/node_modules/@angular/cli/commands/serve.js:74:27)
    at Class.<anonymous> (/home/yadav/.nvm/versions/node/v7.4.0/lib/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

@ashjha
Copy link

ashjha commented Feb 14, 2017

i also face this issue try to install npm i --save @angular/compiler-cli and it works for me

@mikeeus
Copy link

mikeeus commented Feb 14, 2017

@rajinder-yadav If I understand correctly your app was created with a previous version of angular-cli, and now you've updated the global angular-cli version.

This issue happened to me, I fixed it by updating my local version of the cli:

rm -rf node_modules dist # use rmdir on Windows
npm install --save-dev @angular/cli@latest
npm install
ng update

Good luck.

@bvaissade
Copy link

I have also problems on app build with previous version !
I try to do :

rm -rf node_modules dist # use rmdir on Windows
npm install --save-dev @angular/cli@latest
npm install
ng update

I am using Windows 10 (32bits)
node -v = v7.5.0
npm -v = 4.2.0
ng -v =

__ _  _ __    __ _  _   _ | |  __ _  _ __         ___ | |(_)
/ _` || '_ \  / _` || | | || | / _` || '__|_____  / __|| || |
| (_| || | | || (_| || |_| || || (_| || |  |_____|| (__ | || |
\__,_||_| |_| \__, | \__,_||_| \__,_||_|          \___||_||_|
              |___/
angular-cli: 1.0.0-beta.26
node: 7.5.0
os: win32 ia32
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.31
@angular/compiler-cli: 2.4.7

when i type ng serve :
You have to be inside an angular-cli project in order to use the serve command.

ng update :
The specified command update is invalid. For available options, see ng help.

@m0t0r
Copy link

m0t0r commented Feb 14, 2017

@bvaissade make sure you dont have angular-cli in devDependencies in your package.json, there should be only @angular/cli and then reinstall all packages with:

rm -rf node_modules
npm install

@rajinder-yadav
Copy link
Author

rajinder-yadav commented Feb 14, 2017

OK I did the steps today on two older cli projects and things are working fine.

My initial issue has been resolved, I may have pooched something along the way last night!

To update CLI as well as update to Angular to 2.4.7 I did

rm -rf node_modules dist # use rmdir on Windows
npm install --save-dev @angular/cli@latest

npm update --save
npm update --save-dev
npm install

@filipesilva
Copy link
Contributor

Closing as resolved.

brigaldies added a commit to brigaldies/wts-ui that referenced this issue Jul 4, 2017
…ent (Dublin, Ireland). Since then, Angular CLI was updated (Don't quite remember why; maybe for an Angular class), hence invalidating the wts-ui project. The changes in this check-in reflect the instructions in angular/angular-cli#4679.
@samirasaly
Copy link

thanks @mikeeus you saved me

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants