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

ng command : module.js : 538 throw err

Open satishmallick opened this issue 9 years ago • 6 comments

image

satishmallick avatar Nov 07 '17 11:11 satishmallick

I did the following: 1.Download node.js form node.org 2.Install 3. type "command prompt", right click "Run as Administrator" 4. ng --help

module.js:538 throw err; ^

Error: Cannot find module 'C:\Users\Satish\AppData\Roaming\npm\node_modules@angular\cli\bin\ng' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Function.Module.runMain (module.js:676:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3

satishmallick avatar Nov 07 '17 11:11 satishmallick

This seems to be related to your machine settings, not to angular-cli itself

  1. uninstall angular cli if you have already installed it npm uninstall -g @angular/cli

  2. Delete the C:\Users\Satish\AppData\Roaming\npm\node_modules@angular folder if it still exists after the uninstall

3 reinstall angular-cli globally npm install -g @angular/cli

abidmix avatar Nov 07 '17 17:11 abidmix

See this, how we can solve this error

C:\Users\Satish>ng -v module.js:538 throw err; ^ Error: Cannot find module 'C:\Users\Satish\AppData\Roaming\npm\node_modules@angular\cli\bin\ng' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Function.Module.runMain (module.js:676:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3

satishmallick avatar Nov 08 '17 05:11 satishmallick

image

satishmallick avatar Nov 08 '17 05:11 satishmallick

Unfortunately npm installation issues is not something to be tracked via the Angular CLI repo. Please see documentation for npm or look into a support site such as stack overflow.

Brocco avatar Nov 14 '17 03:11 Brocco

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.