Skip to content
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

Build breaks with node-neat and v1.1.1 #4

Closed
linkurzweg opened this issue May 12, 2017 · 7 comments
Closed

Build breaks with node-neat and v1.1.1 #4

linkurzweg opened this issue May 12, 2017 · 7 comments

Comments

@linkurzweg
Copy link

linkurzweg commented May 12, 2017

I cannot build my project anymore with the latest version of the package.

I get the following error message:
`gulp-sass-vars: Injected 1 variables to sass:
$output-bourbon-deprecation-warnings: 'false';

node_modules/source-map/lib/source-map-generator.js:277
throw new Error('Invalid mapping: ' + JSON.stringify({
^
Error: Invalid mapping: {"generated":{"line":1,"column":29271},"source":"../../../../../../node_modules/bourbon-neat/app/assets/stylesheets/grid/_span-columns.scss","original":{"line":89,"column":-353},"name":null}`

The error appears in conjuction wiht node-neat, my task looks like this:
gulp.task(css:${publication.name}, () => { return gulp.src(${config.paths.scss}/styles.scss) .pipe(gulpif(process.env.watch === 'true', plumber({errorHandler: onWatchError}))) .pipe(newer({ dest: ${config.paths.target}/css/styles.css, extra: extraFiles })) .pipe(sourcemaps.init()) .pipe(sassVars(vars)) .pipe(sass({ outputStyle: 'expanded', includePaths: ['css:' + publication.name].concat(normalize, neat), errLogToConsole: true })) .pipe(sourcemaps.write('./')) .pipe(gulp.dest(${config.paths.target}/css)) .pipe(touch()); })

If I go back to v1.1.0 everything works fine.

@giowe
Copy link
Owner

giowe commented Jun 7, 2017

checking on it, tnx!

@giowe
Copy link
Owner

giowe commented Jun 7, 2017

@VitorLuizC reverting on my previous version this 1.0.3 this issue doesn't exists. I pushed a stable branch and published on npm version 1.2.0 (exactly equal as 1.0.3). Can you find the problem here ?

@VitorLuizC
Copy link
Contributor

@linkurzweg I'm trying to reproduce this issue.

@giowe can you just rollback the stream treatment instead of using gulp-header? I think there's something to do with it.

@VitorLuizC
Copy link
Contributor

@linkurzweg can you paste here your styles.scss and your gulpfile.js ?

I can't reproduce with my simple mock.
image

@linkurzweg
Copy link
Author

linkurzweg commented Jun 8, 2017

@VitorLuizC, I don't know if that will actually help, because our build system is a bit complicated. There are multiple tasks in different files spread across multiple projects that share the same codebase to some extent. Can I send you the files directly? Thanks for looking into this :)

Oh, I did have to revert to v1.0.3 to get everything working again, not 1.1.0. Sorry.

@VitorLuizC
Copy link
Contributor

@linkurzweg Can you provide the vars U're trying to inject? I could test if my PR is causing this. Also, bootstrap-sass, node-sass and other modules have issues like it.
brunch/sass-brunch#141
sass/libsass#2312
mozilla/source-map#254
dlmanning/gulp-sass#609 (An issue opened today)

Can you confirm if those issues are related with this one?

@giowe I will rollback your stream treatment and make another PR.

VitorLuizC added a commit to VitorLuizC/parse-sass-value that referenced this issue Jun 8, 2017
@linkurzweg
Copy link
Author

@VitorLuizC , sure, this is the only var I try to inject:
$output-bourbon-deprecation-warnings: 'false';

I can confirm that the issues are related. The "invalid mapping" error points to a line that is starting with an ampersand.

However, with v1.2.0 of the package, everything seems to be fine :)

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

No branches or pull requests

3 participants