I run the following commands as administrator on a standard Windows 10.
I installed angular (ver 8), as per book...
D:\>npm install -g @angular/cli
C:\Users\ThinkInCode\AppData\Roaming\npm\ng -> C:\Users\ThinkInCode\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
> @angular/cli@8.3.8 postinstall C:\Users\ThinkInCode\AppData\Roaming\npm\node_modules\@angular\cli
> node ./bin/postinstall/script.js
+ @angular/cli@8.3.8
added 244 packages from 185 contributors in 155.387s
D:\>cd wamp64\www\NGAPPS\UDEMY
D:\wamp64\www\NGAPPS\UDEMY>ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.8
Node: 12.11.0
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.803.8
@angular-devkit/core 8.3.8
@angular-devkit/schematics 8.3.8
@schematics/angular 8.3.8
@schematics/update 0.803.8
rxjs 6.4.0
The went on to creating my project...
D:\wamp64\www\NGAPPS\UDEMY>ng new NG8-APP --routing
? Which stylesheet format would you like to use? CSS
CREATE NG8-APP/angular.json (3617 bytes)
CREATE NG8-APP/package.json (1283 bytes)
CREATE NG8-APP/README.md (1025 bytes)
CREATE NG8-APP/tsconfig.json (543 bytes)
CREATE NG8-APP/tslint.json (1953 bytes)
CREATE NG8-APP/.editorconfig (246 bytes)
CREATE NG8-APP/.gitignore (631 bytes)
CREATE NG8-APP/browserslist (429 bytes)
CREATE NG8-APP/karma.conf.js (1021 bytes)
CREATE NG8-APP/tsconfig.app.json (270 bytes)
CREATE NG8-APP/tsconfig.spec.json (270 bytes)
CREATE NG8-APP/src/favicon.ico (948 bytes)
CREATE NG8-APP/src/index.html (294 bytes)
CREATE NG8-APP/src/main.ts (372 bytes)
CREATE NG8-APP/src/polyfills.ts (2838 bytes)
CREATE NG8-APP/src/styles.css (80 bytes)
CREATE NG8-APP/src/test.ts (642 bytes)
CREATE NG8-APP/src/assets/.gitkeep (0 bytes)
CREATE NG8-APP/src/environments/environment.prod.ts (51 bytes)
CREATE NG8-APP/src/environments/environment.ts (662 bytes)
CREATE NG8-APP/src/app/app-routing.module.ts (246 bytes)
CREATE NG8-APP/src/app/app.module.ts (393 bytes)
CREATE NG8-APP/src/app/app.component.html (25530 bytes)
CREATE NG8-APP/src/app/app.component.spec.ts (1107 bytes)
CREATE NG8-APP/src/app/app.component.ts (213 bytes)
CREATE NG8-APP/src/app/app.component.css (0 bytes)
CREATE NG8-APP/e2e/protractor.conf.js (810 bytes)
CREATE NG8-APP/e2e/tsconfig.json (214 bytes)
CREATE NG8-APP/e2e/src/app.e2e-spec.ts (642 bytes)
CREATE NG8-APP/e2e/src/app.po.ts (262 bytes)
npm WARN tarball tarball data for @angular/compiler@~8.2.9 (sha1-8BQhStPcbrC/OVzSgpMWPQd6p7Q=) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for @angular/core@~8.2.9 (sha1-tOUwPWkijTA2KmShrkX46IpfLiQ=) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for typescript@~3.5.3 (sha1-yDD2V/k/HqhGgZ6SkJL1/lmD6Xc=) seems to be corrupted. Trying one more time.
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path D:\wamp64\www\NGAPPS\UDEMY\NG8-APP\node_modules\.staging\@angular\core-3db91d17\fesm2015\core.js
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\wamp64\www\NGAPPS\UDEMY\NG8-APP\node_modules\.staging\@angular\core-3db91d17\fesm2015\core.js'
npm ERR! [OperationalError: EPERM: operation not permitted, unlink 'D:\wamp64\www\NGAPPS\UDEMY\NG8-APP\node_modules\.staging\@angular\core-3db91d17\fesm2015\core.js'] {
npm ERR! cause: [Error: EPERM: operation not permitted, unlink 'D:\wamp64\www\NGAPPS\UDEMY\NG8-APP\node_modules\.staging\@angular\core-3db91d17\fesm2015\core.js'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'D:\\wamp64\\www\\NGAPPS\\UDEMY\\NG8-APP\\node_modules\\.staging\\@angular\\core-3db91d17\\fesm2015\\core.js'
npm ERR! },
npm ERR! stack: "Error: EPERM: operation not permitted, unlink 'D:\\wamp64\\www\\NGAPPS\\UDEMY\\NG8-APP\\node_modules\\.staging\\@angular\\core-3db91d17\\fesm2015\\core.js'",
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'D:\\wamp64\\www\\NGAPPS\\UDEMY\\NG8-APP\\node_modules\\.staging\\@angular\\core-3db91d17\\fesm2015\\core.js',
npm ERR! parent: 'NG8-APP'
npm ERR! }
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.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ThinkInCode\AppData\Roaming\npm-cache\_logs\2019-10-10T17_09_33_041Z-debug.log
Package install failed, see above.
For a whole day, no amount of effort has yielded a successful installation...
I have disabled the antivirus and severally repeated the install, also reboot my machine, ensured VS Studio Code is closed..., run npm cache clean
, then npm cache clean --force
, then manually deleted both npm cache and npm folders under the %APPDATA% path and then reinstalled angular with npm install -g @angular/cli
all to the same EPERM error,... different files but same error.
I have read somewhere recommendations to downgrade to ver. 7, but I can't because I need angular ver. 8... Besides, ver. 8 should install successfully somehow! I also need a fairly recent Node.js because of a certain React Native project. What on earth should I do differently?? Pls help.