I'm trying to create a new Angular 5 project. I've installed @angular/cli version 1.6.3 and typed:
ng new project --routing After everything has been installed I did:
cd project ng build And got the following errors:
Module build failed: Error: d:...\project\src\main.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
Module build failed: Error: d:...\project\src\polyfills.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
There are a couple of discussions about this on the Angular github page, but other than saying this has been resolved, or pointing to an issue where there where ts files in node_modules - it was not helpful.
We're using Windows 10 here.
EDIT: the tsconfig files are (there are two):
{ "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" ] } } The other (src/tsconfig.app.json):
{ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", "baseUrl": "./", "module": "es2015", "types": [] }, "exclude": [ "test.ts", "**/*.spec.ts" ] } These were both created by ng new.
includesection to either of them did not help.