报错:xx.ts is missing from the TypeScript compilation. Please make sure it is in your tsconf

本文档解决了一个关于TypeScript编译的问题,报错表明xx.ts文件未被正确包含在编译配置中。解决方案是检查引用xx.ts的import语句路径是否正确,并确保tsconfig.json文件通过'files'或'include'属性包含了该文件。

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

Error: ./src/app/shared/Functions/xx.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: src\app\shared\Functions\xx.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
    at AngularCompilerPlugin.getCompiledFile (xx\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:951:23)
    at xx\node_modules\@ngtools\webpack\src\loader.js:43:31
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

解决思路:在引用xx.ts的文件中,检查 import { xx } from ‘路径’ 这句的路径是否正确

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值