Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Failing to generate source map when importing a partial #47

Closed
UltCombo opened this issue Apr 24, 2014 · 9 comments
Closed

Failing to generate source map when importing a partial #47

UltCombo opened this issue Apr 24, 2014 · 9 comments
Labels

Comments

@UltCombo
Copy link
Contributor

Here's a simplified test case:

app.scss

@import "partial";

_partial.scss

// must contain some outputable CSS
.foo { color: blue; }

gulpfile.js:

var gulp = require('gulp'),
    sass = require('gulp-ruby-sass');
gulp.task('default', function() {
    gulp.src('scss/app.scss')
        .pipe(sass({ sourcemap: true }))
        .pipe(gulp.dest('public/css'));
});

Throws:

WARNING: Couldn't determine public URL for "path/to/_partial.scss" while generating sourcemap.
Without a public URL, there's nothing for the source map to link to.

Using Sass 3.3.5, gulp-ruby-sass 0.4.3, gulp 3.6.2, node 0.10.26.

Is this a bug? Am I overlooking something? Any possible workaround?

Thanks.

@szkrd
Copy link

szkrd commented May 8, 2014

Same here; any news? Are we missing something?

@robwierzbowski
Copy link
Contributor

Believe this is a dupe of #17.

@UltCombo
Copy link
Contributor Author

@robwierzbowski thanks for the pointer. Seems like the cause of the issue might be the same, though, if I recall correctly, last time I've tested it simply throws an error instead of generating maps with wrong source paths.

@robwierzbowski
Copy link
Contributor

Closing — if you still get the error with the current master (pre-release), please comment in #17.

@UltCombo
Copy link
Contributor Author

@robwierzbowski thanks, but now it simply does not compile at all. Not only the sourcemap, nothing will compile if there's an @import -- it throws an "import not found" error. Should I open a new issue?

@robwierzbowski
Copy link
Contributor

Are you using the latest commit? In package.json:

"gulp-ruby-sass": "git://github.com/sindresorhus/gulp-ruby-sass.git#83bce4ce1317185add687934c3ec77db3cf0cba6"

@UltCombo
Copy link
Contributor Author

@robwierzbowski I've removed gulp-ruby-sass, cloned the repo into node_modules and installed the dependencies. Well, thanks for reminding me of the Git URIs on package.json, had forgotten it for a sec. Well, it doesn't change anything in this case, the error is still the same:

[01:46:18] gulp-ruby-sass: error ./app.scss (Line 1: File to import not found or unreadable: mixins.
Load path: C:/Users/Ult/AppData/Local/Temp/gulp-ruby-sass)

_mixins.scss is in the same folder as app.scss.

Now if I add the absolute path in the loadPath option, it compiles but fails to determine the public URL for the map with the same error message as OP.

@robwierzbowski
Copy link
Contributor

I'm working on Sassmap paths, will update in the thread mentioned above. The error you're getting sounds familiar from the older version of gulp-rub-sass, but I thought the newer version fixed things up.

I'm guessing this issue is Windows specific. Can you open a new issue for the file not found error, copy these notes over, and let us know the contents of the C:/Users/Ult/AppData/Local/Temp/gulp-ruby-sass dir?

@UltCombo
Copy link
Contributor Author

@robwierzbowski alright, I'll have it up in a couple minutes.

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

No branches or pull requests

4 participants