简体   繁体   English

找不到模块:错误:无法解析“@angular/core/src/render3”:ViewChildren QueryList

[英]Module not found: Error: Can't resolve '@angular/core/src/render3': ViewChildren QueryList

(Angular CLI: 1.7.4) (角度 CLI:1.7.4)

I am using ViewChildren in a component.我在组件中使用 ViewChildren。 It is working fine if I define it as如果我将其定义为,它工作正常

@ViewChildren(TestComponent) testComponents;

However, when I specify the type of testComponents as QueryList:但是,当我将 testComponents 的类型指定为 QueryList 时:

@ViewChildren(TestComponent) testComponents: QueryList<TestComponent>;

it gives error:它给出了错误:

ERROR in./src/app/components/search-component/search.component.ts Module not found: Error: Can't resolve '@angular/core/src/render3' in 'D:\Test Applications\test-application\src\app\components\search-component'

Delete node-module folder and run 'npm install' command from the root directory.This installs all dependencies listed in package.json file.If you want to install specific package,execute'npm i your package name. Delete node-module folder and run 'npm install' command from the root directory.This installs all dependencies listed in package.json file.If you want to install specific package,execute'npm i your package name. Let me know if it dosen't work?让我知道它是否不起作用?

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

相关问题 找不到模块'@angular/core/src/render3' - Cannot find module '@angular/core/src/render3' 找不到模块:错误:无法解析&#39;@ angular / core&#39; - Module not found: Error: Can't resolve '@angular/core' 找不到模块:错误:无法解析“/usr/src/app/src”中的“@angular/localize/init” - Module not found: Error: Can't resolve '@angular/localize/init' in '/usr/src/app/src' 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 5:找不到模块:错误:无法解析'@ angular / forms / src / validators' - Angular 5: Module not found: Error: Can't resolve '@angular/forms/src/validators' 在Angular 7中获取错误./src/app/app.component.ts找不到模块:错误:无法解析 - Get error in Angular 7 ./src/app/app.component.ts Module not found: Error: Can't resolve Angular 2:找不到模块:错误:无法解析 - Angular 2: Module not found: Error: Can't resolve 未找到模块,无法解决 Angular 中的错误 - Module not found, Can't resolve error in Angular 找不到模块:错误无法解析“角度” - Module not found:Error can't resolve 'angular' 找不到模块错误无法解析角度7 - Module not found error can't resolve angular 7
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM