Nebular: NbTableModule,NbTreeGridModule has compiling errors when build with Angular 9.0.0-rc.4

Created on 1 Dec 2019  路  3Comments  路  Source: akveo/nebular

Issue type

I'm submitting a ... (check one with "x")

  • [X] bug report
  • [ ] feature request

Issue description

Current behavior:

when ng build with angular 9.0.0-rc.4, there are following errors:

...
Compiling @angular/cdk/table : es2015 as esm2015
Compiling @nebular/theme : es2015 as esm2015
ERROR: Failed to compile entry-point @nebular/theme due to compilation errors:
node_modules/@nebular/theme/fesm2015/index.js(17759,5): error TS-996003: Appears in the NgModule.exports of NbTableModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
node_modules/@nebular/theme/fesm2015/index.js(17795,5): error TS-996002: Appears in the NgModule.imports of NbTreeGridModule, but itself has errors
node_modules/@nebular/theme/fesm2015/index.js(17795,5): error TS-996003: Appears in the NgModule.exports of NbTreeGridModule, but itself has errors

An unhandled exception occurred: Failed to compile entry-point @nebular/theme due to compilation errors:
node_modules/@nebular/theme/fesm2015/index.js(17759,5): error TS-996003: Appears in the NgModule.exports of NbTableModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
node_modules/@nebular/theme/fesm2015/index.js(17795,5): error TS-996002: Appears in the NgModule.imports of NbTreeGridModule, but itself has errors

node_modules/@nebular/theme/fesm2015/index.js(17795,5): error TS-996003: Appears in the NgModule.exports of NbTreeGridModule, but itself has errors

Expected behavior:

It should be no error.

Steps to reproduce:

1)ng new nebulartest
2)cd nebulartest
3)ng add @nebular/theme@next
4)ng build

the errors appears:

C:worktmpnebulartest>ng build
0% compiling
Compiling @nebular/theme : es2015 as esm2015

ERROR in Failed to compile entry-point @nebular/theme due to compilation errors:
node_modules/@nebular/theme/fesm2015/index.js(17791,5): error TS-996003: Appears in the NgModule.exports of NbTableModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
node_modules/@nebular/theme/fesm2015/index.js(17827,5): error TS-996002: Appears in the NgModule.imports of NbTreeGridModule, but itself has errors

node_modules/@nebular/theme/fesm2015/index.js(17827,5): error TS-996003: Appears in the NgModule.exports of NbTreeGridModule, but itself has errors

Related code:

insert short code snippets here

Other information:

npm, node, OS, Browser

<!--
Node, npm: `node --version` and `npm --version`
OS: Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
Browser: Chrome/Safari/Firefox/etc?
-->

node --version
v12.2.0
npm --version
6.9.0
OS: Win10
Browser: Chrome

Angular, Nebular

<!--
Check your `package-lock.json` or locate a `package.json` in the `node_modules` folder.
-->

{
"name": "nebulartest",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~9.0.0-rc.4",
"@angular/cdk": "^8.0.0",
"@angular/common": "~9.0.0-rc.4",
"@angular/compiler": "~9.0.0-rc.4",
"@angular/core": "~9.0.0-rc.4",
"@angular/forms": "~9.0.0-rc.4",
"@angular/platform-browser": "~9.0.0-rc.4",
"@angular/platform-browser-dynamic": "~9.0.0-rc.4",
"@angular/router": "~9.0.0-rc.4",
"@nebular/eva-icons": "4.0.0-rc.8",
"@nebular/theme": "^4.6.0",
"eva-icons": "^1.1.1",
"rxjs": "~6.5.3",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.0-rc.4",
"@angular/cli": "~9.0.0-rc.4",
"@angular/compiler-cli": "~9.0.0-rc.4",
"@angular/language-service": "~9.0.0-rc.4",
"@schematics/angular": "~9.0.0-rc.4",
"@types/jasmine": "~3.4.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.2",
"ts-node": "~8.3.0",
"tslint": "~5.18.0",
"typescript": "~3.6.4"
}
}

Most helpful comment

I've got the same error when use this config

tsconfig.json:
"angularCompilerOptions": {
"enableIvy": true
}

in Angular 8

All 3 comments

I've got the same happening after updating all angular libraries to next (rc4), including the cli and cdk. Exact same error

I've got a similar happening with angular 9.0.0-rc.5.

ERROR in Failed to compile entry-point @nebular/theme due to compilation errors:
node_modules/@nebular/theme/fesm2015/index.js(17791,5): error TS-996003: Appears in the NgModule.exports of NbTableModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
node_modules/@nebular/theme/fesm2015/index.js(17827,5): error TS-996002: Appears in the NgModule.imports of NbTreeGridModule, but itself has errors
node_modules/@nebular/theme/fesm2015/index.js(17827,5): error TS-996003: Appears in the NgModule.exports of NbTreeGridModule, but itself has errors

I've got the same error when use this config

tsconfig.json:
"angularCompilerOptions": {
"enableIvy": true
}

in Angular 8

Was this page helpful?
0 / 5 - 0 ratings