Compiling error when importing a custom library

I’m currently developing a library that use DevExtreme to show some grids.

I’ve created the library and this is what the project package.json looks like:

"dependencies": {
    "@angular/animations": "^8.2.14",
    "@angular/common": "^8.2.14",
    "@angular/compiler": "^8.2.14",
    "@angular/core": "^8.2.14",
    "@angular/forms": "^8.2.14",
    "@angular/platform-browser": "^8.2.14",
    "@angular/platform-browser-dynamic": "^8.2.14",
    "@angular/router": "^8.2.14",
    "devextreme": "18.2.8",
    "devextreme-angular": "18.2.8",
    "rxjs": "^6.5.2",
    "tslib": "^1.10.0",
    "zone.js": "~0.9.1",
    "jquery": "3.4.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.803.19",
    "@angular-devkit/build-ng-packagr": "~0.803.19",
    "@angular/cli": "^8.3.25",
    "@angular/compiler-cli": "^8.2.14",
    "@angular/language-service": "^8.2.14",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.0.1",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "ng-packagr": "^5.4.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tsickle": "^0.37.0",
    "tslint": "~5.15.0",
    "typescript": "^3.5.3"
  }

This is the library’s package.json

{
  "name": "data-grid-lib",
  "version": "0.0.1",
  "peerDependencies": {
  }
}

This is the module:

@NgModule({
  declarations: [DataGridLibComponent],
  imports: [
    BrowserModule,
    HttpClientModule,
    DxDataGridModule,
    DxTextBoxModule
  ],
  exports: [DataGridLibComponent]
})
export class DataGridLibModule {
  public static forRoot(config): ModuleWithProviders<DataGridLibModule> {
    return {
      ngModule: DataGridLibModule,
      providers: [DataGridLibService, {provide: DataGridServiceConfig, useValue: config}]
    };
  }
}

The code stuff is irrelevant.
If I build this library and import it into a project it gives me this error :

ERROR in The target entry-point “data-grid-lib” has missing
dependencies:
– devextreme/data/custom_store
– devextreme-angular

The solution to solve this error is simple yet non-sense to me:

Install the devExtreme dependencies into the project as well.

What I’m not getting is this:

The library holds the DevExtreme logic, the project doesn’t. So am I doing something wrong or both the library and the project must have the same dependencies?

package.json of the test project where I get the error:

"dependencies": {
    "@angular/animations": "^9.0.0",
    "@angular/common": "~9.0.0-rc.9",
    "@angular/compiler": "~9.0.0-rc.9",
    "@angular/core": "~9.0.0-rc.9",
    "@angular/forms": "~9.0.0-rc.9",
    "@angular/platform-browser": "~9.0.0-rc.9",
    "@angular/platform-browser-dynamic": "~9.0.0-rc.9",
    "@angular/router": "~9.0.0-rc.9",
    "ngx-toastr": "^12.0.0",
    "rxjs": "~6.5.4",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.900.0-rc.10",
    "@angular/cli": "~9.0.0-rc.10",
    "@angular/compiler-cli": "~9.0.0-rc.9",
    "@angular/language-service": "~9.0.0-rc.9",
    "@types/jasmine": "~3.5.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",
    "toastr": "^2.1.4",
    "ts-node": "~8.3.0",
    "tslint": "~5.18.0",
    "typescript": "~3.7.4"
  }

Source: New feed
Source Url Compiling error when importing a custom library