I am trying to create a new project using npm. It getting the following error. I have also tried opening the command prompt window 'Run as Administrator'. Still facing an issue.
Package.json
{
"name": "codeanal",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~8.2.14",
"@angular/common": "~8.2.14",
"@angular/compiler": "~8.2.14",
"@angular/core": "~8.2.14",
"@angular/forms": "~8.2.14",
"@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~8.2.14",
"rxjs": "~6.4.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.19",
"@angular/cli": "~8.3.19",
"@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.14",
"@types/node": "~8.9.4",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.5.3"
}
}
Error:
19889 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\watchpack\node_modules\fsevents): 19890 warn enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: Cannot cd into 'D:\Angular\codeanal\node_modules\.staging\fsevents-952d5fc1' 19891 verbose enoent SKIPPING OPTIONAL DEPENDENCY: This is related to npm not being able to find a file. 19891 verbose enoent SKIPPING OPTIONAL DEPENDENCY: 19892 verbose stack Error: EPERM: operation not permitted, unlink 'D:\Angular\codeanal\node_modules\.staging\typescript-06d41b51\lib\lib.dom.d.ts' 19893 verbose cwd D:\Angular\codeanal 19894 verbose Windows_NT 10.0.15063 19895 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--quiet" 19896 verbose node v12.13.0 19897 verbose npm v6.12.0 19898 error code EPERM 19899 error syscall unlink 19900 error path D:\Angular\codeanal\node_modules\.staging\typescript-06d41b51\lib\lib.dom.d.ts 19901 error errno -4048 19902 error Error: EPERM: operation not permitted, unlink 'D:\Angular\codeanal\node_modules\.staging\typescript-06d41b51\lib\lib.dom.d.ts' 19902 error [OperationalError: EPERM: operation not permitted, unlink 'D:\Angular\codeanal\node_modules\.staging\typescript-06d41b51\lib\lib.dom.d.ts'] { 19902 error cause: [Error: EPERM: operation not permitted, unlink 'D:\Angular\codeanal\node_modules\.staging\typescript-06d41b51\lib\lib.dom.d.ts'] { 19902 error errno: -4048, 19902 error code: 'EPERM', 19902 error syscall: 'unlink', 19902 error path: 'D:\\Angular\\codeanal\\node_modules\\.staging\\typescript-06d41b51\\lib\\lib.dom.d.ts' 19902 error }, 19902 error stack: "Error: EPERM: operation not permitted, unlink 'D:\\Angular\\codeanal\\node_modules\\.staging\\typescript-06d41b51\\lib\\lib.dom.d.ts'", 19902 error errno: -4048, 19902 error code: 'EPERM', 19902 error syscall: 'unlink', 19902 error path: 'D:\\Angular\\codeanal\\node_modules\\.staging\\typescript-06d41b51\\lib\\lib.dom.d.ts', 19902 error parent: 'codeanal' 19902 error } 19903 error The operation was rejected by your operating system. 19903 error It's possible that the file was already in use (by a text editor or antivirus), 19903 error or that you lack permissions to access it. 19903 error 19903 error If you believe this might be a permissions issue, please double-check the 19903 error permissions of the file and its containing directories, or try running 19903 error the command again as root/Administrator. 19904 verbose exit [ -4048, true ]