-
-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid mapping: Negative column number #351
Comments
+1
|
Can confirm, same error and stack trace. It's also fixed by setting the |
Please provide a small example repository that demonstrates the error. Could you also check if the error is still there without the sass-loader? |
@jhnns My other CSS files without |
Hi @jhnns in my case the error seems to be |
@maggo thanks for the example repo. The processed source map contains a negative column number. I don't know how we can fix that since these column numbers come from node-sass. I've tried to compile the I think, this is also related to #272 |
I'm having the same issue. If anyone's interested I have a simpler case reproduced in this repo One possible workaround is to use |
+1
|
webpack -p
I'm also having this issue. @ash14 Changing the
|
@albertogasparin awesome! This is a good starting point to locate the error. Unfortunately, I don't have time for that now, but I would be glad if someone of you could tackle it. Crazy, I've never seen mixins and @mixin FormField {
position: relative;
display: flex;
line-height: $Pollicino-FormField-height;
&-label { // <---- that's where the error is coming from |
@jhnns It's pretty common. I've checked and I have error due to Foundation CSS mixins - they also have |
+1
Only "compressed" output triggered it, "compact" & "verbose" are working. |
I have the same problem: { Compressed is NOT working. I agree with @b4cedev, only Compact and verbose are working. |
(I've hesitated posting this since two people already seem to have observed the same, but just in case, another confirmation with details...) I'm running into this too, and with a similar configuration: ExtractTextPlugin, Sass and PostCSS. Indeed adding an |
Any solution ? outputStyle: 'compact' doesn`t work for me :( . |
It appears this may be related to sass/libsass#2312 |
Confirmed, it is related to sass/libsass#2312, need fix in |
Close here, not related to |
|
Temp fix: {
test: /\.scss$/,
use: [
'style-loader',
{ loader: 'css-loader', options: { sourceMap: true } },
{ loader: 'sass-loader', options: { sourceMap: false } }, // disable source map
]
} At least we can see the original filename of CSS styles... |
In my case value of column number is equal to length of mixin name. I use expanded outputStyle
And that mixin: @mixin form-element {
//....
&:focus {}
} May be it occasion)) But logically, what we do with sass placeholder? Replace! even with mixin name, isnt it)) Also name includes hyphen (negative, minus), Foundation seems to be loving hyphens in names)) |
Regarding, "I used expanded outputStyle" @mishelen Can you elaborate on what you mean by this? Is there a way to have it show additional details on failure? I've not been able to track down the source of my occurrence. |
Ok, part of related webpack config is: // ...
devtool: process.env.NODE_ENV === 'PRODUCTION' ? 'source-map' : 'inline-source-map',
// ...
{
test: /\.scss$/, use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [{
loader: 'css-loader', options: {
sourceMap: true
}
}, {
loader: 'postcss-loader',
options: {
sourceMap: true,
plugins: function () {
return [
autoprefixer({
cascade: false,
browsers: ['last 2 versions']
})
];
}
}
}, {
loader: 'sass-loader', options: {
sourceMap: true,
outputStyle: 'expanded',
includePaths: [
path.resolve(ROOT_PATH, 'node_modules/foundation-sites/scss')
]
}
}] I'm have just noticed that webpack without Stacktrace of error is repeated locally and on Heroku:
|
@mishelen Thank you. This is a hugely helpful reference point in trying to pin down my own instance of this issue. |
Here is what I just figured out as a workaround.
The error appeared on the line with
|
If the problem is related to sass, it is probably due to "compressed" outputStyle. I figured it out just change compressed to "compact". |
Thanks @jotavejv , that fixed my error! |
+1 on this... anyone know how to keep |
Google brought me here after searching for a solution for sass/libsass#2312 which is sadly locked so I can't comment there but maybe this will help someone else: Before: After: |
There is a problem with sourcemaps generation on a production build (`yarn build`). The problem is described at the below link, as the current fix is to, change the default output style to `compact`: webpack-contrib/sass-loader#351 (comment)
There is a problem with sourcemaps generation on a production build (`yarn build`). The problem is described at the below link, as the current fix is to, change the default output style to `compact`: webpack-contrib/sass-loader#351 (comment)
@jcapozzi that's the only solution that fixed my issue! Many many many thanks! Now I'm going to submit a PR to material-components-web |
This worked for me.
|
I had the same issue, my problem was at |
When running
webpack -p
I am getting errors that appear to be related to producing sourcemaps. When i setsourceMap: false
forsass-loader
the build runs cleanly.Stack trace follows:
The text was updated successfully, but these errors were encountered: