简体   繁体   English

npm 抛出错误,看不懂

[英]npm throw error, could not able to understand

here is the error I am getting while i do npm install.这是我在安装 npm 时遇到的错误。

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: 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 ).很难确定,但正如这个相当新的 github 问题( 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 be npm instal --no-audit那里的建议是带有--no-audit标志的,所以我假设你的命令是npm instal --no-audit

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 指令抛出错误,无法理解 - Directive throw error, not able to understand 无法理解以下错误消息 - not able to understand below Error message 什么可能导致与 npm 找不到文件相关的错误? 我的 node_modules 子文件夹中没有内容。 这是为什么? - What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that? 无法将 ionic 与电容器集成,npm 抛出错误 - Not able to integrate ionic with capacitor , npm throws error 抛出新错误('找不到本地“打字稿” package。') - throw new Error('Could not find local “typescript” package.') 安装“single-spa”后出现错误,无法理解问题 - Getting error after install `single-spa`, not able to understand the issue 什么是错误率! 代码 ENOLOCAL npm ERR! 无法安装错误? - What is the ERR! code ENOLOCAL npm ERR! Could not install from error? 运行 npm 安装时 Angular 应用程序错误 - 无法解决依赖关系 - Angular app error when running npm install - Could not resolve dependency Angular 通用 npm 运行服务:ssr 抛出错误:package.Z466DEEC76ECDF5FCA6D385571F6 不存在 - Angular universal npm run serve:ssr throw error : package.json does not exist 无法理解亲子交流 - Not able to understand parent child communication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM