0

I am new in angular, When i just run ng new prj-name command in specific folder i get following error message:

Error:

npm ERR!
enoent ENOENT: no such file or directory, 
rename 'Desktop\angular\angular-intro\node_modules\@angular-devkit\build-optimizer\node_modules\typescript' ->
'Desktop\angular\angular-intronode_modules\@angular-devkit\build-optimizer\node_modules\.typescript.DELETE' 
npm ERR! enoent This is related to npm not being able to find a file.

I have following Version of node and angular on my computer:

Version:

C:\Users\lin0x\Desktop\angular>node -v
v9.9.0
C:\Users\lin0x\Desktop\angular>ng -v

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.7.3
Node: 9.9.0
OS: win32 x64
Angular:
...

1 Answer 1

1
npm install -g @angular/cli

now paste this in cmd it should work. you might not install globally

and visit here for better guide.

Sign up to request clarification or add additional context in comments.

9 Comments

as i mentioned in question i've installed angular with npm install -g @angular/cli, But in creation step when i run ng new prj-name i get error!
@linux just try this once [sudo] npm uninstall -g @angular/cli npm cache clean [sudo] npm install -g @angular/cli and then install again:)
I am on windows OS, should i run cmd as administrator instead of linux sudo ?
no need to run as administrator. just hit command directly it will uninstall cli globally
@linux if its work please accept my answer. thank you
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.