here is the error I am getting while i do npm install.
TypeError: Invalid Version:
npm verb stack at new SemVer (C:\Users\PAGOTTX\AppData\Local\Volta\tools\image\node\16.16.0\node_modules\npm\node_modules\semver\classes\semver.js:38:13)
npm verb stack at compare (C:\Users\PAGOTTX\AppData\Local\Volta\tools\image\node\16.16.0\node_modules\npm\node_modules\semver\functions\compare.js:3:32)
npm verb stack at Object.gte (C:\Users\PAGOTTX\AppData\Local\Volta\tools\image\node\16.16.0\node_modules\npm\node_modules\semver\functions\gte.js:2:30)
npm verb stack at Node.canDedupe (C:\Users\PAGOTTX\AppData\Local\Volta\tools\image\node\16.16.0\node_modules\npm\node_modules\@npmcli\arborist\lib\node.js:1071:32)
npm verb stack at PlaceDep.pruneDedupable (C:\Users\PAGOTTX\AppData\Local\Volta\tools\image\node\16.16.0\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:468:14)
npm verb stack at PlaceDep.placeInTree (C:\Users\PAGOTTX\AppData\Local\Volta\tools\image\node\16.16.0\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:329:14)
npm verb stack at PlaceDep.place (C:\Users\PAGOTTX\AppData\Local\Volta\tools\image\node\16.16.0\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:216:10)
npm verb stack at new PlaceDep (C:\Users\PAGOTTX\AppData\Local\Volta\tools\image\node\16.16.0\node_modules\npm\node_modules\@npmcli\arborist\lib\place-dep.js:73:10)
npm verb stack at C:\Users\PAGOTTX\AppData\Local\Volta\tools\image\node\16.16.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:990:31
npm verb stack at Array.map (<anonymous>)
npm verb cwd C:\Users\PAGOTTX\Projects\hf-ui
npm verb Windows_NT 10.0.19042
npm verb node v16.16.0
npm verb npm v8.11.0
npm ERR! Invalid Version:
npm verb exit 1
npm timing npm Completed in 10424ms
npm verb unfinished npm timer reify 1658855279338
npm verb unfinished npm timer reify:loadTrees 1658855279400
npm verb unfinished npm timer idealTree:buildDeps 1658855284781
npm verb unfinished npm timer idealTree:node_modules/@babel/runtime-corejs3 1658855284786
npm verb code 1
I have cleaned the cache multiple time. and restarted the system as well. nothing helps. please help me to understand the issue.
package.json:
"name": "hf-workspace",
"version":"1.0.0",
"license": "MIT",
"scripts": {
"start": "nx serve",
"build:clinicianLocal": "nx build clinician --prod --base-href /apps/clinician/",
"build:clinician": "npm install nx --force && nx build clinician --base-href /apps/clinician/",
"build:pcs-admin-docker": "nx build --base-href /",
"test": "nx test clinician --coverage",
"test:clinician": "nx test clinician --coverage",
"test:formsLib": "nx test hf-forms --coverage",
"clearJest": "jest --clearCache",
"postinstall": "ngcc --properties es2015 browser module main",
"prepare": "cmd"
},
"private": true,
"devDependencies": {
"@angular-devkit/build-angular": "^14.0.1",
"@angular-eslint/eslint-plugin": "~13.1.0",
"@angular-eslint/eslint-plugin-template": "13.3.0",
"@angular-eslint/template-parser": "~13.1.0",
"@angular/cli": "14.0.1",
"@angular/compiler-cli": "14.0.1",
"@angular/language-service": "14.0.1",
"@babel/eslint-parser": "^7.18.2",
"@ngrx/schematics": "~13.0.0",
"@ngrx/store-devtools": "~13.0.0",
"@nrwl/angular": "14.4.3",
"@nrwl/cli": "14.4.3",
"@nrwl/cypress": "14.4.3",
"@nrwl/eslint-plugin-nx": "14.4.3",
"@nrwl/jest": "14.4.3",
"@nrwl/linter": "14.4.3",
"@nrwl/storybook": "14.4.3",
"@nrwl/workspace": "14.4.3",
"@storybook/addon-essentials": "~6.4.12",
"@storybook/angular": "~6.4.12",
"@storybook/builder-webpack5": "~6.4.12",
"@storybook/core-server": "~6.4.12",
"@storybook/manager-webpack5": "~6.4.12",
"@testing-library/angular": "12.0.1",
"@testing-library/dom": "^8.14.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/user-event": "^14.2.1",
"@types/jest": "27.4.1",
"@types/node": "16.11.7",
"@types/testing-library__jest-dom": "^5.14.5",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "5.29.0",
"@typescript-eslint/parser": "5.29.0",
"cypress": "^9.1.0",
"eslint": "8.15.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-jest": "^26.5.3",
"husky": "^8.0.1",
"jasmine-marbles": "~0.9.1",
"jest": "27.5.1",
"jest-preset-angular": "11.1.1",
"nx": "14.4.3",
"prettier": "2.6.2",
"ts-jest": "27.1.4",
"ts-node": "10.8.2",
"typescript": "4.7.4",
"webpack": "^5.64.0"
},
"dependencies": {
"@amcharts/amcharts5": "^5.2.8",
"@angular-devkit/architect": "^0.1401.0",
"@angular-devkit/core": "^14.1.0",
"@angular/animations": "14.0.1",
"@angular/cdk": "14.0.1",
"@angular/common": "14.0.1",
"@angular/compiler": "14.0.1",
"@angular/core": "14.0.1",
"@angular/flex-layout": "^14.0.0-beta.40",
"@angular/forms": "14.0.1",
"@angular/material": "14.0.1",
"@angular/platform-browser": "14.0.1",
"@angular/platform-browser-dynamic": "14.0.1",
"@angular/router": "14.0.1",
"@azure/msal-angular": "^2.3.3",
"@azure/msal-browser": "^2.27.0",
"@ngrx/component-store": "^14.0.1",
"@ngrx/effects": "~13.0.0",
"@ngrx/entity": "~13.0.0",
"@ngrx/router-store": "~13.0.0",
"@ngrx/store": "^14.0.1",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
"jest-junit": "^14.0.0",
"rxjs": "~7.4.0",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
},
"volta": {
"node": "16.16.0"
},
"jest-junit": {
"outputDirectory": "./coverage/xml/",
"outputName": "junit.xml",
"uniqueOutputName": "false"
}
}
Hard to tell for sure, but perhaps something is awry with one of the packages as is mentioned in this rather new-ish github issue (https://github.com/npm/cli/issues/4992).
The suggestion there is to there it with the
--no-audit
flag, so I assume your command will benpm instal --no-audit