swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.62k stars 1.68k forks source link

Update Angular 11 : impossible to build cause of "no such file" icons.css #1999

Open sabrinaToulouse opened 3 years ago

sabrinaToulouse commented 3 years ago

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

[ x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

I just updated to angular 11.2.14 (and ngx-datatable ~19.0.0), and when I try to build my app I now get the error :

ERROR: ENOENT: no such file or directory, open 'C:\Users...\src\tables\component\table-list\~@swimlane\ngx-datatable\assets\icons.css'

I've imported the css like :

@import "~@swimlane/ngx-datatable/index.scss";
@import "~@swimlane/ngx-datatable/themes/material.scss";
@import '~@swimlane/ngx-datatable/assets/icons.css';

I had same issue with the others, but then I used .scss files instead of .css and it solved the issue, but there's no .scss for the icons file.

Please tell us about your environment:

LucasDshg commented 3 years ago

Hi. I think your import is incorrect because the path error is no get in the node module folder.

I have installed it in Angular 11 and 12 end working fine.

My imports.

@import "~@swimlane/ngx-datatable/index.css";
@import "~@swimlane/ngx-datatable/themes/material.scss";
@import "~@swimlane/ngx-datatable/assets/icons.css";
ScottSpittle commented 3 years ago

Hi. I think your import is incorrect because the path error is no get in the node module folder.

I have installed it in Angular 11 and 12 end working fine.

My imports.

@import "~@swimlane/ngx-datatable/index.css";
@import "~@swimlane/ngx-datatable/themes/material.scss";
@import "~@swimlane/ngx-datatable/assets/icons.css";

You should be using the style import in angular.json https://angular.io/guide/workspace-config#styles-and-scripts-configuration

LucasDshg commented 3 years ago

Yes! I forgot to say this because i impoterd i my ower lib using @import and in my apps just rum npm install 😁. In this case i dont need to import in angular.json.

If want to change variavel on the style u can import in angular.json and add @import after your changes. This work with bootstrap. Make sure this lib accept it.