Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

webpack css-loader failing on css validation #1215

Closed
margielm opened this issue Jan 17, 2015 · 6 comments
Closed

webpack css-loader failing on css validation #1215

margielm opened this issue Jan 17, 2015 · 6 comments
Milestone

Comments

@margielm
Copy link

Hello,
In my project I am trying to use angular-material together with webpack. unfortunately for when I am trying to use css-loader to load angular-material.css it is loading on validation:

Module build failed: Error: Please check the validity of the CSS block starting from the line #6153
    at throwError (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:399:15)
    at checkStylesheet (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:1921:22)
    at Object.CSSPRules.stylesheet (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:365:40)
    at _getAST (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:409:38)
    at exports.srcToCSSP (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:2287:16)
    at Object.exports.srcToCSSP (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:2292:16)
    at Object.exports.parse (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/cssoapi.js:7:21)
    at Object.module.exports (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/index.js:18:18)
 @ ./src/scripts/entry.js 9:0-48

I have tried 0.6.1 and 0.7.0-rc3 and on both versions result was the similar.

@Frank3K
Copy link
Contributor

Frank3K commented Jan 17, 2015

Is the line number (6153) from the 0.7.0-rc3 or from the 0.6.1 file?

@margielm
Copy link
Author

thats from 0.7.0-rc3,
here is the stack trace from 0.6.1:

Module build failed: Error: Please check the validity of the CSS block starting from the line #5176
    at throwError (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:399:15)
    at checkStylesheet (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:1921:22)
    at Object.CSSPRules.stylesheet (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:365:40)
    at _getAST (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:409:38)
    at exports.srcToCSSP (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:2287:16)
    at Object.exports.srcToCSSP (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/gonzales.cssp.node.js:2292:16)
    at Object.exports.parse (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/node_modules/csso/lib/cssoapi.js:7:21)
    at Object.module.exports (/Users/margielm/workspace/jelatyna-gui/node_modules/css-loader/index.js:18:18)
 @ ./src/scripts/entry.js 9:0-48

@Frank3K
Copy link
Contributor

Frank3K commented Jan 18, 2015

The start block starting at line 6153 (0.7.0-rc3) does not contain anything odd as far as I can tell. The W3C CSS Validator does report some issues, but not around those lines. Could it be that this is a webpack issue?

@ThomasBurleson ThomasBurleson modified the milestone: 0.7.1 Jan 19, 2015
@naomiblack naomiblack modified the milestones: 0.7.1, 0.8.0 Jan 26, 2015
@ThomasBurleson ThomasBurleson modified the milestones: 0.8.0, 0.9.0 Jan 30, 2015
@mereskin-zz
Copy link

Having the same issue with css file.

Fails with error "Error: Please check the validity of the CSS block starting from the line #2" when required as module: require('my-module/foo.css').

File is valid css. When I copy the same file to project folder and require it as require('./foo.css') it works.

Loader is set up like that: { test: /\.css$/, loader: 'style-loader!css-loader' }

UPDATE: If file is in symlinked folder, webpack fails to load it. Maybe this is an issue with particular loader?

@ThomasBurleson
Copy link
Contributor

Fixed with 2f9eef7.
@margielm, @mereskin - can you confirm with lastest from /bower-material/angular-material.css

@margielm
Copy link
Author

the issue is still there. ust the line number has changed.

ERROR in ./~/css-loader!./~/exports-loader?angular!./bower_components/angular-material/angular-material.css
Module build failed: Error: Please check the validity of the CSS block starting from the line #6718

As a workaround I have used raw loader.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants