angular 項目8升級9 踩坑


* * * is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

我把項目從7升級到8,沒見報這種錯誤。

我把項目從8升級到9之后   ng serve --open  就一直報錯,媽的,老子找了好久的資料,終於找到了

https://stackoverflow.com/questions/52441509/ts-is-missing-from-the-typescript-compilation-please-make-sure-it-is-in-your-ts

7

In my case had a case mistake while importing the class in another component:

import { MyClass } from '../../../shared/models/Myclass'; 

The file was called MyClass.ts (capital C) and import from ../../../Myclass (lower c).

現在時間2020-10-18 03:25。草。

 

注意文件名稱大小與ts中引用文件的路徑是否一致,最好還是全部改小寫吧。

 

ERROR in ./src/app/core/models/filereg.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: ******** is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM