Ngx-datatable: Failed to find '@swimlane/ngx-datatable/release/index.css'

Created on 5 Sep 2019  路  11Comments  路  Source: swimlane/ngx-datatable

This error happens if I try to upgrade from version 15.0.2 to version 16.0.0

ERROR in ./src/assets/scss/main.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--15-3!./src/assets/scss/main.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Failed to find '@swimlane/ngx-datatable/release/index.css'
  in [
    /home/travis/build/azerothcore/Keira3/src/assets/scss
  ]
    at resolveModule.catch.catch (/home/travis/build/azerothcore/Keira3/node_modules/postcss-import/lib/resolve-id.js:35:13)
 @ ./src/assets/scss/main.scss 1:14-257
 @ multi ./src/assets/scss/main.scss

Most helpful comment

Took me a while to debug this issue, but paths to styles have changes in v16, see changelogs here

v15.x.x and before

    "styles": [
          "./node_modules/@swimlane/ngx-datatable/release/index.css",
          "./node_modules/@swimlane/ngx-datatable/release/themes/material.css",
          "./node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
          "src/styles.css"
        ],

After v16.x.x

  "styles": [
          "./node_modules/@swimlane/ngx-datatable/index.css",
          "./node_modules/@swimlane/ngx-datatable/themes/material.css",
          "./node_modules/@swimlane/ngx-datatable/assets/icons.css",
          "src/styles.css"
        ],

All 11 comments

I have the same issue with material.css file. All css seems to have disappeared from the npm package...

.css imported

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

Error:

./src/assets/scss/style.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/assets/scss/style.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Failed to find '@swimlane/ngx-datatable/release/themes/material.css'

Working on a fix

Released 16.0.1. The paths of the files have changed, but they should be there:

image

@FrancescoBorzi @dstj please let me know if you're still seeing issues.

i got
ERROR in Unexpected value 'undefined' exported by the module 'NgxDatatableModule in D:/repos/Buckhead/buckhead-web-ui/ub/ClientApp/node_modules/@swimlane/ngx-datatable/swimlane-ngx-datatable.d.ts'
after instaling 16.0.1 and correcting the paths.

@mhadji that should be fixed in 16.0.2. ng-packagr doesn't like barrel imports.
Thanks for checking these for me.

16.0.2 installed and project served and built with no problem.聽Thanks

Great, closing this in that case. If you notice anything else, please let me know by opening a new issue.

Took me a while to debug this issue, but paths to styles have changes in v16, see changelogs here

v15.x.x and before

    "styles": [
          "./node_modules/@swimlane/ngx-datatable/release/index.css",
          "./node_modules/@swimlane/ngx-datatable/release/themes/material.css",
          "./node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
          "src/styles.css"
        ],

After v16.x.x

  "styles": [
          "./node_modules/@swimlane/ngx-datatable/index.css",
          "./node_modules/@swimlane/ngx-datatable/themes/material.css",
          "./node_modules/@swimlane/ngx-datatable/assets/icons.css",
          "src/styles.css"
        ],

Took me a while to debug this issue, but paths to styles have changes in v16, see changelogs here

v15.x.x and before

    "styles": [
          "./node_modules/@swimlane/ngx-datatable/release/index.css",
          "./node_modules/@swimlane/ngx-datatable/release/themes/material.css",
          "./node_modules/@swimlane/ngx-datatable/release/assets/icons.css",
          "src/styles.css"
        ],

After v16.x.x

  "styles": [
          "./node_modules/@swimlane/ngx-datatable/index.css",
          "./node_modules/@swimlane/ngx-datatable/themes/material.css",
          "./node_modules/@swimlane/ngx-datatable/assets/icons.css",
          "src/styles.css"
        ],

Where should I put these new paths?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lautarobock picture lautarobock  路  3Comments

JanStock picture JanStock  路  3Comments

mmrath picture mmrath  路  3Comments

IngoManthey picture IngoManthey  路  3Comments

jguttman94 picture jguttman94  路  3Comments