简体   繁体   English

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

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

When ever i try to run the project (npx ng serve -o) i get a error.每当我尝试运行该项目(npx ng serve -o)时,都会出现错误。

An unhandled exception occurred: Cannot find module '@angular/compiler-cli/src/tooling'发生未处理的异常:找不到模块'@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, "dependencies": { "@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/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 { "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", "karma": "~5.0.0", "karma-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", "protractor": "~7.0.0", "protractor-console-plugin": "^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" } } .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" } }

There is maybe something wrong with your node_moduels , try if this works:您的node_moduels可能有问题,如果可行,请尝试:

   rm -rf node_modules

   npm install

It will remove your node_modules/ folder and then reinstall the dependencies from package.json.它将删除您的 node_modules/ 文件夹,然后从 package.json 重新安装依赖项。

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

相关问题 找不到模块@angular/compiler-cli/src/tooling - Cannot find module @angular/compiler-cli/src/tooling 发生未处理的异常:无法使用 ng serve 找到模块“@angular/compiler-cli” - An unhandled exception occurred: Cannot find module '@angular/compiler-cli' with ng serve 发生未处理的异常:找不到模块'@angular/compiler-cli/ngcc' - An unhandled exception occurred: Cannot find module '@angular/compiler-cli/ngcc' Angular 运行 NG SERVE 出现错误找不到模块'@angular/compiler-cli/src/tooling' - Angular run NG SERVE get a error Cannot find module '@angular/compiler-cli/src/tooling' 我在尝试执行 ng serve 时收到此错误“发生未处理的异常:找不到模块'@angular/compiler-cli' - I Get this error when im trying to execute ng serve "An unhandled exception occurred: Cannot find module '@angular/compiler-cli' 我正在获取找不到模块'@ angular / compiler-cli' - I am getting the cannot find module '@angular/compiler-cli' 找不到模块“@angular/compiler-cli/ngcc” - Cannot find module '@angular/compiler-cli/ngcc' 错误:找不到模块'@angular/compiler-cli/linker' - Error: Cannot find module '@angular/compiler-cli/linker' 找不到模块'@ angular / compiler-cli / ngtoolds2' - Cannot find module '@angular/compiler-cli/ngtoolds2' 在 ng serve 找不到模块“@angular/compiler-cli/ngcc” - Cannot find module '@angular/compiler-cli/ngcc' at ng serve
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM