angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng serve fails - No such File or Directory

Open maddymaster opened this issue 10 years ago • 3 comments

Please provide us with the following information: ng commands return a no such file or directory error after a pc reboot. ng serve was working fine, however after a reboot it seems to be giving me this error

maddyspc:first-app MaddyVeena$ ng serve
-bash: /root/.nvm/versions/node/v6.3.1/lib/node_modules/angular-cli/bin/ng: No such file or directory

OS?

Mac OSX El Capitan

Versions.

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

Repro steps.

I just installed Angular CLI and created an app, ran ng serve it worked fine. Did a reboot and getting this error. Tried many solutions no go, what should I do to get the directory in the place? should I be changing the alias?

The log given by the failure.

maddyspc:first-app MaddyVeena$ ng serve
-bash: /root/.nvm/versions/node/v6.3.1/lib/node_modules/angular-cli/bin/ng: No such file or directory

Mention any other details that might be useful.

I have latest node 6.7.0 running and latest NPM.

maddymaster avatar Sep 29 '16 09:09 maddymaster

-bash: /root/.nvm/versions/node/v6.3.1/lib/node_modules/angular-cli/bin/ng

Note the version string. NG is not being called from the Node 6.7.0 node_modules, but an older Node 6.3.1 installation that's been emptied out.

celliott181 avatar Sep 29 '16 12:09 celliott181

You seem to have some npm-related problems on your system.

I'm sorry I can't help you more, but this problem doesn't seem related to the CLI itself.

filipesilva avatar Oct 05 '16 15:10 filipesilva

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.