我有两个声明文件,分别是loadmethods.d.ts和staticUrl.d.ts。我使用这些声明文件将一些jquery函数包含到我的angular应用程序中。它可以正常使用JIT,但是想要转移到AOT。但是在运行此命令后我收到了以下错误 node_modules / .bin / rollup -p tsconfig-aot.json
[!]错误:无法解决' ../ Declaration / loadMethods'来自App \ Services \ api.service.js 错误:无法解决' ../ Declaration / loadMethods'来自App \ Services \ api.service.js 出错(E:\ Tests \ AOT TEST \ Versla.Admin \ node_modules \ rollup \ dist \ rollup.js:185:14) at then.resolvedId(E:\ Tests \ AOT TEST \ Versla.Admin \ node_modules \ rollup \ dist \ rollup.js:10062:8)
我已经引用了声明文件,并在app.service.ts文件中将其导入如下,
tsconfig-aot.json 文件如下。
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es2015", "dom"],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"./node_modules/@types/"
]
},
"files": [
"App/app.module.ts",
"App/main.ts"
],
"angularCompilerOptions": {
"genDir": "aot",
"skipMetadataEmit": true
}
}
Coudn找不到任何解决方案,任何消化措施都可以避免这种情况?