简体   繁体   English

找不到模块'@angular/core/src/render3'

[英]Cannot find module '@angular/core/src/render3'

I have some trouble after updating from angular 7 to 8.从 angular 7 更新到 8 后,我遇到了一些麻烦。

 ng --version

Angular CLI: 8.3.22
Node: 10.18.1
OS: linux x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.22
@angular-devkit/build-angular     0.803.22
@angular-devkit/build-optimizer   0.803.22
@angular-devkit/build-webpack     0.803.22
@angular-devkit/core              8.3.22
@angular-devkit/schematics        8.3.22
@angular/cdk                      8.0.2
@angular/cli                      8.3.22
@angular/flex-layout              8.0.0-beta.27
@angular/material                 8.0.2
@ngtools/webpack                  8.3.22
@schematics/angular               8.3.22
@schematics/update                0.803.22
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.39.2

So this is my package.json:所以这是我的 package.json:

  "dependencies": {
    "@angular/animations": "^8.0.0",
    "@angular/cdk": "~8.0.0",
    "@angular/common": "^8.0.0",
    "@angular/compiler": "^8.0.0",
    "@angular/core": "^8.0.0",
    "@angular/flex-layout": "~8.0.0-beta.27",
    "@angular/forms": "^8.0.0",
    "@angular/material": "~8.0.0",
    "@angular/platform-browser": "^8.0.0",
    "@angular/platform-browser-dynamic": "^8.0.0",
    "@angular/router": "^8.0.0",
    "browserslist": "^4.8.3",
    "caniuse-lite": "^1.0.30001020",
    "chromedriver": "^79.0.0",
    "classlist.js": "^1.1.20150312",
    "core-js": "~2.6.11",
    ...
    "material-design-icons": "~3.0.1",
    "rxjs": "~6.4.0",
    "tslib": "~1.9.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.803.22",
      ...
  },

Nothing special in it.没什么特别的。 When I try to build my project I get Cannot find module '@angular/core/src/render3' and yes:当我尝试构建我的项目时,我得到Cannot find module '@angular/core/src/render3' ,是的:

ls node_modules/@angular/core/src/
core.externs.js  r3_symbols.d.ts  testability

What is render3?什么是渲染3? I bet there is again some version mismatch of the dependencies, but I can't figure it out this time.我敢打赌,依赖项的版本再次不匹配,但这次我无法弄清楚。

use利用

import { ******* } from "@angular/core";

instead of代替

import { ******* } from "@angular/core/src/render3";

暂无
暂无

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

相关问题 找不到模块:错误:无法解析“@angular/core/src/render3”:ViewChildren QueryList - Module not found: Error: Can't resolve '@angular/core/src/render3': ViewChildren QueryList / node_modules / @ angular / core / src / render3 / instructions“'没有导出的成员'directive' - /node_modules/@angular/core/src/render3/instructions"' has no exported member 'directive' node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11)中的错误:错误TS2451:无法重新声明块作用域变量'ngDevMode' - ERROR in node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): error TS2451: Cannot redeclare block-scoped variable 'ngDevMode' ionic serve在“node_modules/@angular/core/src/render3/definition.d.ts”中有Typescript Error - ionic serve has Typescript Error at “node_modules/@angular/core/src/render3/definition.d.ts” 找不到模块“@ angular / core / src / metadata / directives” - cannot find module “@angular/core/src/metadata/directives” 找不到模块@ angular / core - Cannot find module @angular/core 找不到模块'@angular/core - Cannot find module '@angular/core 如何解决错误:找不到模块“ @ angular / core / src / view / util” - How to solve Error: Cannot find module "@angular/core/src/view/util” ng add @nebular/theme - 错误:找不到模块@angular-devkit/core/src/terminal - ng add @nebular/theme - ERROR: Cannot find module @angular-devkit/core/src/terminal 找不到模块“@angular/core/src/metadata/lifecycle_hooks”-primeng/table/table.d.ts - Cannot find module '@angular/core/src/metadata/lifecycle_hooks' - primeng/table/table.d.ts
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM