How can i fix this installation issue

Viewed 564

I'm installing Angular new project on my windows 7 system, im having issue in setup is there any way to solve this thing?

i have created new angular project it gives error i also tried to install npm in old project ,its not working again ,i also tried installing typescript again,i also tried deleting package-lock.json and installing npm again, then i have tried ng v

while ng v got this

Angular CLI: 8.0.3
Node: 10.16.0
OS: win32 ia32
Angular: <error>
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.800.3 (cli-only)
@angular-devkit/build-angular   <error>
@angular-devkit/core            8.0.3 (cli-only)
@angular-devkit/schematics      8.0.3 (cli-only)
@schematics/angular             8.0.3 (cli-only)
@schematics/update              0.800.3 (cli-only)
rxjs                            6.4.0 (cli-only)
typescript                      <error>

i expected to run the program will get this error msg while creating new angular project

npm ERR! path D:\AngularProject\myNew\node_modules\.staging\@yarnpkg\lockfile-31897f94\index.js
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\AngularProject\myNew\node_modules\.staging\@yarnpkg\lockfile-31897f94\index.js'
npm ERR!  { [Error: EPERM: operation not permitted, unlink 'D:\AngularProject\myNew\node_modules\.staging\@yarnpkg\lockfile-31897f94\index.js']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, unlink 'D:\AngularProject\myNew\node_modules\.staging\@yarnpkg\lockfile-31897f94\index.js'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'unlink',
npm ERR!      path:
npm ERR!       'D:\\AngularProject\\myNew\\node_modules\\.staging\\@yarnpkg\\lockfile-31897f94\\index.js' },
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, unlink \'D:\\AngularProject\\myNew\\node_modules\\.staging\\@yarnpkg\\lockfile-31897f94\\index.js\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path:
npm ERR!    'D:\\AngularProject\\myNew\\node_modules\\.staging\\@yarnpkg\\lockfile-31897f94\\index.js',
npm ERR!   parent: 'myNew' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

is there any way to solve this issue?

2 Answers

I got the similar problem when I tried to create new Angular project. I don't know if you've already solved yours but for those who still get the same problem, this answer worked for me https://stackoverflow.com/a/52853169/ Hope it works for you too.

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

Step 1: uninstalling angular/cli and nodejs as administrator.

Step 2: Delete folders from %appdata% (npm, npm-cache) or use following command npm cache clean

Step 3: delete "nodejs" folder from Programs and Files

Step 4: Reboot

Step 5 Reintall lastest version node

Setp 6: Install angular/cli

Related