Dies ist meine Angular5-Projektstruktur.
Sowohl tsconfig.app.json
als auch package.json
enthalten diesen Abschnitt
"include": [
"/src/main.ts",
"/src/polyfills.ts"
]
Aber egal was ich versuche, ich bekomme immer noch diesen Fehler:
\polyfills.ts & \main.ts is missing from the TypeScript compilation.
Please make sure it is in your tsconfig via the 'files' or 'include' property.
Hat jemand eine Idee, was hier fehlt?
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
src/tsconfig.app.json
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"types": []
},
"include": [
"main.ts",
"polyfills.ts"
],
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
Die Lösung gefunden Das Problem ist, dass ich mich in einem symbolischen Linkverzeichnis befand ($ HOME/dev -> d:\dev \) Wechseln Sie in das ursprüngliche Verzeichnis (d:\dev) und führen Sie Ihre Befehle aus.
Möglicherweise verwenden Sie einen absoluten Pfad.
Versuchen Sie es von:
"/src/main.ts",
zu
"src/main.ts",
(Oder möglicherweise nur "main.ts"
)