"XX.ngfactory.js is missing from the TypeScript compilation" when ng build
See original GitHub issueI build my project use ng build --prod
.
throw these error:
ERROR in ./node_modules/_@ng-bootstrap_ng-bootstrap@1.1.1@@ng-bootstrap/ng-bootstrap/alert/alert.ngfactory.js
Module build failed: Error: D:\Angular\video-server\node_modules\_@ng-bootstrap_ng-bootstrap@1.1.1@@ng-bootstrap\ng-bootstrap\alert\alert.ngfactory.js is missing from the TypeScript
compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library reposit
ory to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).
at AngularCompilerPlugin.getCompiledFile (D:\Angular\video-server\node_modules\_@ngtools_webpack@1.9.5@@ngtools\webpack\src\angular_compiler_plugin.js:656:23)
at plugin.done.then (D:\Angular\video-server\node_modules\_@ngtools_webpack@1.9.5@@ngtools\webpack\src\loader.js:467:39)
@ ./src/app/app.module.ngfactory.js 12:0-90
@ ./src/main.ts
@ multi ./src/main.ts
Also there are popover.ngfactory.js, modal-window.ngfactory.js …
And my tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2016",
"dom"
]
}
}
Version: angular-cli: 1.6.5 angular: ^5.2.0 ng-bootstrap: 1.1.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
ts is missing from the TypeScript compilation. Please make ...
The @wtw folder is under the node_modules folder. The child project was building the parent package fine when it was in Angular version...
Read more >angular/angular-cli - Gitter
when I try to run ng build --prod. I am getting below error. *This version of CLI is only compatible with angular version...
Read more >Angular: Writing AoT-friendly applications | by David - Medium
First, the compiler generates factory code in TypeScript and then compiles both the *.ngfactory.ts and *.component.ts files to JavaScript. This means that the ......
Read more >Build Angular Like An Architect (Part 1) - DEV Community
Builders enable you to code custom builds with TypeScript and RxJS ... At ng-conf 2017 the Angular team announced the AOT compiler is ......
Read more >ng build ignore warnings | The AI Search Engine You Control
ng build --prod --aot=false. I would get will return a error similar to. Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@RajPack, I’ve tested, but doesn’t t work. As JHipster use Angular 6, the syntax is a little bit different that you said. The syntax should be instead (see https://github.com/angular/angular-cli/issues/10896 and https://github.com/angular/angular-cli/wiki/angular-workspace) :
As the problem is with command
./mvn verify
(trigger packaging of the application), I’ve tried also with https://webpack.js.org/configuration/resolve/#resolve-symlinks, without more success. Have you an idea ?It’s strange, because some of ngx-bootstrap modules are founded, like :
But not :
Please, what do you think about that @pkozlowski-opensource ?
I’m getting this using cli 7.0.0.rc.0:
Can it be related? Should I open a new issue?