Angular 2 Datatable not working

Unable to compile datatable.

See npm package:
“angular-datatables”: “^4.2.0”,

Error:

ERROR in multi ./~/bootstrap/dist/css/bootstrap.min.css ./~/datatables.net-dt/css/jquery.dataTables.css ./src/styles.css
Module not found: Error: Can't resolve 'C:\Users\cmegafu\Documents\angular-projects\bulk-nip\node_modules\bootstrap\dist\css\bootstrap.min.css' in 'C:\Users\cmegafu\Documents\angular-projects\bulk-nip'
 @ multi ./~/bootstrap/dist/css/bootstrap.min.css ./~/datatables.net-dt/css/jquery.dataTables.css ./src/styles.css

ERROR in C:/Users/cmegafu/Documents/angular-projects/bulk-nip/node_modules/@types/datatables.net/index.d.ts (293,17): Cannot find name 'object'.

Did you install all the required packages listed in their documentation?

npm install jquery --save
npm install datatables.net --save
npm install datatables.net-dt --save
npm install angular-datatables --save
npm install @types/jquery --save-dev
npm install @types/datatables.net --save-dev

https://l-lin.github.io/angular-datatables/#/getting-started

yes, I installed all the required dependencies but the exception below keeps coming up.

node_modules/@types/datatables.net/index.d.ts (462,33): Cannot find name ‘object’.

Looks like an issue with your TypeScript and Angular.

What about versioning? You’re using 4.2.0 (instead of 5) and Angular 2 (instead of 6), are you sure your versions are compatible?

Other than that, I’m not sure. This is a very specific library question. I would suggest asking on SO or on their Github issues, it’s unlikely you’re going to find someone here familiar enough with this specific package to help.

Hello Mwaburn

Thanks for the response.

I am still unable to have the datatable working.

For the version of angular cli I am using please see below:

angular-cli: 1.0.0-beta.28.3
node: 8.11.1
os: win32 x64
@angular/common: 2.4.10
@angular/compiler: 2.4.10
@angular/core: 2.4.10
@angular/forms: 2.4.10
@angular/http: 2.4.10
@angular/platform-browser: 2.4.10
@angular/platform-browser-dynamic: 2.4.10
@angular/router: 3.4.10
@angular/compiler-cli: 2.4.10

Please help Mawburn

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.