繁体   English   中英

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

[英]An unhandled exception occurred: Cannot find module '@angular/compiler-cli/src/tooling'

每当我尝试运行该项目(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-browser": "7.1.0", "@angular/platform-browser-dynamic": "7.1.0", "@angular/platform-server": "7.1.0", "@angular/路由器”:“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”、“松露合同”:“^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/node”:“^12.11.1”、“codelyzer” :“^6.0.0”、“jasmine-core”:“~3.6.0”、“jasmine-spec-reporter”:“~5.0.0”、“业力”:“~5.0.0”、“业力- chrome-launcher": "~3.1.0", "karma-cli": "^1.0.1", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~ 4.0.0”、“karma-jasmine-html-reporter”:“^1.5.0”、“量角器”:“~7.0.0”、“量角器控制台插件”:“^0.1.1”、“ts -node”:“^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" } }

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

   rm -rf node_modules

   npm install

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

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM