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

ng command is not working in local project folder

Open sundarsan opened this issue 8 years ago • 4 comments

Versions

<!--
Output from: `ng --version`.
If nothing, output from: `node --version` and `npm --version`.
  Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
-->

windows 10 ng -v -> Angular CLI: 1.7.3 Node: 8.9.4 OS: win32 x64

Repro steps

Just try to run ng and any commands inside the project folder. same command is working in global

Observed behavior

<!-- Normally this includes a stack trace and some more information. -->

module.js:540 throw err; ^

Error: Cannot find module './_ListCache' at Function.Module._resolveFilename (module.js:538:15) at Function.Module._load (module.js:468:25) at Module.require (module.js:587:17) at require (internal/module.js:11:18) at Object. (C:\Users\sundsant\Desktop\Projects\SourceCode\frontend\devSource\ftd-mig-ui\node_modules\lodash_Stack.js:1:79) at Module._compile (module.js:643:30) at Object.Module._extensions..js (module.js:654:10) at Module.load (module.js:556:32) at tryModuleLoad (module.js:499:12) at Function.Module._load (module.js:491:3)

Desired behavior

ng command should work

Mention any other details that might be useful (optional)

any ng commands is not working inside the project folder

sundarsan avatar Mar 19 '18 12:03 sundarsan

hey , only update or install npm command:::::::: sudo npm install or sudo npm update

piyarulps avatar Mar 19 '18 13:03 piyarulps

@piyarulps I am using windows as i mentioned so i donot have a sudo.

I have even tried running it as administrator. even in that case i can able to run it in the specific path but not in the project folder

sundarsan avatar Mar 21 '18 15:03 sundarsan

This seems like a problem with your node/npm and not with Angular CLI.

Please have a look at the fixing npm permissions page, common errors page, npm issue tracker, or open a new issue in that issue tracker if the problem you are experiencing isn't known.

alan-agius4 avatar Mar 13 '19 12:03 alan-agius4

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.