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

Unable to install Angular CLI on windows 7.

Open snatuva opened this issue 9 years ago • 4 comments

unable to install angular cli even after running cmd with admin. please help.

13948 verbose enoent SKIPPING OPTIONAL DEPENDENCY: This is related to npm not being able to find a file.
13948 verbose enoent SKIPPING OPTIONAL DEPENDENCY:
13949 verbose stack Error: EPERM: operation not permitted, rename 'D:\npm-global\npm\node_modules\@angular\cli\node_modules\clone-deep\package.json.3848079859' -> 'D:\npm-global\npm\node_modules\@angular\cli\node_modules\clone-deep\package.json'
13950 verbose cwd D:\git repos\angular-test
13951 verbose Windows_NT 6.1.7601
13952 verbose argv "D:\\installed\\npm\\node.exe" "D:\\installed\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@angular/cli"
13953 verbose node v8.8.1
13954 verbose npm  v5.4.2
13955 error path D:\npm-global\npm\node_modules\@angular\cli\node_modules\clone-deep\package.json.3848079859
13956 error code EPERM
13957 error errno -4048
13958 error syscall rename
13959 error Error: EPERM: operation not permitted, rename 'D:\npm-global\npm\node_modules\@angular\cli\node_modules\clone-deep\package.json.3848079859' -> 'D:\npm-global\npm\node_modules\@angular\cli\node_modules\clone-deep\package.json'
13959 error  { Error: EPERM: operation not permitted, rename 'D:\npm-global\npm\node_modules\@angular\cli\node_modules\clone-deep\package.json.3848079859' -> 'D:\npm-global\npm\node_modules\@angular\cli\node_modules\clone-deep\package.json'
13959 error   cause:
13959 error    { Error: EPERM: operation not permitted, rename 'D:\npm-global\npm\node_modules\@angular\cli\node_modules\clone-deep\package.json.3848079859' -> 'D:\npm-global\npm\node_modules\@angular\cli\node_modules\clone-deep\package.json'
13959 error      errno: -4048,
13959 error      code: 'EPERM',
13959 error      syscall: 'rename',
13959 error      path: 'D:\\npm-global\\npm\\node_modules\\@angular\\cli\\node_modules\\clone-deep\\package.json.3848079859',
13959 error      dest: 'D:\\npm-global\\npm\\node_modules\\@angular\\cli\\node_modules\\clone-deep\\package.json' },
13959 error   stack: 'Error: EPERM: operation not permitted, rename \'D:\\npm-global\\npm\\node_modules\\@angular\\cli\\node_modules\\clone-deep\\package.json.3848079859\' -> \'D:\\npm-global\\npm\\node_modules\\@angular\\cli\\node_modules\\clone-deep\\package.json\'',
13959 error   errno: -4048,
13959 error   code: 'EPERM',
13959 error   syscall: 'rename',
13959 error   path: 'D:\\npm-global\\npm\\node_modules\\@angular\\cli\\node_modules\\clone-deep\\package.json.3848079859',
13959 error   dest: 'D:\\npm-global\\npm\\node_modules\\@angular\\cli\\node_modules\\clone-deep\\package.json',
13959 error   parent: '@angular/cli' }
13960 error Please try running this command again as root/Administrator.
13961 verbose exit [ -4048, true ]

snatuva avatar Oct 31 '17 11:10 snatuva

I am not sure about your set up... Which angular-cliversion are you trying to install. This looks like a permission issue. But is your operating system installed on the D: drive and is the user you are logged onto the machine an Administrator of the machine. Is your machine hooked to a domain.

Normally when you run command prompt as admin on Windows 7 or 10 you get this screen. And operating system is residing on the C: drive

image

What does your command prompt in admin mode screen look like. Do you still get the error when you run the install command in powershell

abidmix avatar Oct 31 '17 15:10 abidmix

Yes, I am running cmd with admin. I changed the default installation path to D drive. and also changed global packages also into D drive. I have installed other modules(globally and same folder) ther is no problem with that. I get this error only when i try to install angular CLI.

I am using this proxy under corporate firewall. this is the .npmrc file in C drive. `` http-proxy=http://username:[email protected]:8080/ https-proxy=http://username:[email protected]:8080/ cache=D:\npm-global\npm-cache strict-ssl=false registry=http://registry.npmjs.org/

``

snatuva avatar Nov 01 '17 05:11 snatuva

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 if the problem you are experiencing isn't known.

filipesilva avatar Nov 02 '17 13:11 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.