0

每当我尝试运行该项目(npx ng serve -o)时,都会出现错误。

发生未处理的异常:找不到模块'@angular/compiler-cli/src/tooling'

{ "name": "LandTransfer", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", “test”:“ng test --watch=false”,“lint”:“ng lint”,“e2e”:“ng e2e”,“postinstall”:“node patch.js”},“private”:true, “依赖”:{“@angular/animations”:“7.1.0”,“@angular/cdk”:“^7.1.0”,“@angular/common”:“7.1.0”,“@angular/compiler ": "^7.1.0", "@angular/core": "7.1.0", "@angular/forms": "7.1.0", "@angular/material": "^7.1.0", " @angular/platform-b​​rowser": "7.1.0",“@angular/platform-b​​rowser-dynamic”:“7.1.0”、“@angular/platform-server”:“7.1.0”、“@angular/router”:“7.1.0”、“@angular/service -worker”:“^7.1.0”,“autoprefixer”:“^10.0.2”,“bootstrap”:“^4.3.1”,“bufferutil”:“^4.0.1”,“core-js”: “^2.5.7”、“ethers”:“^4.0.20”、“jquery”:“^1.9.1”、“less”:“^2.3.1”、“popper.js”:“^1.14。 7”、“rxjs”:“6.3.3”、“stylus”:“^0.52.4”、“tailwindcss”:“^2.0.0”、“truffle-contract”:“^4.0.1”、“tslib ": "^2.0.0", "typedarray-to-buffer": "^3.1.5", "utf-8-validate":“^5.0.2”、“web3”:“1.0.0-beta.37”、“zone.js”:“~0.11.3”}、“devDependencies”:{“@angular-devkit/build-angular” :“~0.1102.3”,“@angular-devkit/core”:“0.8.1”,“@angular/cli”:“^11.2.3”,“@angular/compiler-cli”:“^7.1。 0”、“@angular/language-service”:“7.1.0”、“@types/jasmine”:“~3.6.0”、“@types/jasminewd2”:“^2.0.6”、“@types/节点”:“^12.11.1”,“codelyzer”:“^6.0.0”,“jasmine-core”:“~3.6.0”,“jasmine-spec-reporter”:“~5.0.0”,“业力”:“~5.0.0”,“业力铬启动器”:“~3.1.0”,“业力-cli”:“^1.0.1”,“业力覆盖伊斯坦布尔报告者“:“〜3.0.2”,“业力茉莉花”:“〜4.0.0”,“业力茉莉花-html-reporter”:“^1.5.0”,“量角器”: “~7.0.0”、“量角器控制台插件”:“^0.1.1”、“ts-node”:“^3.3.0”、“tslint”:“~6.1.0”、“打字稿”: "^3.1.1", "webpack": "^4.26.1", "webpack-dev-server": "^3.1.10" }, "optionalDependencies": { "fsevents": "^1.2.13" } }“^3.3.0”、“tslint”:“~6.1.0”、“typescript”:“^3.1.1”、“webpack”:“^4.26.1”、“webpack-dev-server”:“^ 3.1.10" }, "optionalDependencies": { "fsevents": "^1.2.13" } }“^3.3.0”、“tslint”:“~6.1.0”、“typescript”:“^3.1.1”、“webpack”:“^4.26.1”、“webpack-dev-server”:“^ 3.1.10" }, "optionalDependencies": { "fsevents": "^1.2.13" } }

4

1 回答 1

0

您的 可能有问题node_moduels,如果可行,请尝试:

   rm -rf node_modules

   npm install

它将删除您的 node_modules/ 文件夹,然后从 package.json 重新安装依赖项。

于 2021-03-07T07:09:54.330 回答