englue / meteor-bootstrap3-sass

Meteor package for Bootstrap 3 with Sass support
GNU Lesser General Public License v3.0
40 stars 15 forks source link

"file to import not found" in Meteor 0.9.0.1 - wrong import name? #7

Closed neopostmodern closed 10 years ago

neopostmodern commented 10 years ago

I added reywood:bootstrap3-sass to my project and upon running meteor I get this now:

=> Errors prevented startup:

While building the application:
client/styles/site.sass: Scss compiler error: undefined
/[...]/client/styles/site.sass:1: error: file to import not found or unreadable: "../../.meteor/local/build/programs/server/assets/packages/reywood:bootstrap3-sass/bootstrap"

When browsing to .meteor/local/build/programs/server/assets/packages/ I can only find a folder called reywood_bootstrap3-sass - renaming the import seems to fix the issue.

reywood commented 10 years ago

Hmm, it's possible the directory name is platform dependent. What platform are you running the app on?

yeehaa123 commented 10 years ago

I had the same problem, but it worked when I replaced it with:

@import '.meteor/local/build/programs/server/assets/packages/reywood:bootstrap3-sass/_bootstrap.scss';
neopostmodern commented 10 years ago

Running latest Ubuntu (14.04) and latest Meteor (0.9.0.1 + CORDOVA-PREVIEW@5)

p-j commented 10 years ago

I have a similar issue, I've tested with a brand new project. I'm running latest ubuntu and meteor 0.9.0.1

It seems that once you've added reywood:bootstrap3-sass to your project and @import '.meteor/local/build/programs/server/assets/packages/reywood:bootstrap3-sass/bootstrap'; to your SCSS file, anytime you run meteor reset && meteor you will see

=> Errors prevented startup:

While building the application:
client/stylesheets/main.scss: Scss compiler error: undefined
/<path_to_project_root>/client/stylesheets/<stylesheet_name>.scss:1: error: file to import not found or unreadable: '.meteor/local/build/programs/server/assets/packages/reywood:bootstrap3-sass/bootstrap'

Temporary workaround: modify your scss file in anyway (adding a blank line is enough) and save it. Now it compiles properly.

Once it has build successfully once, if you avoid the reset part, it should work correctly.

It looks like a race condition but I haven't digged much.

reywood commented 10 years ago

@p-j Does it literally have <path_to_project_root> and <stylesheet_name> in the error message? That's pretty strange. Also, did it work with the colon in the path (instead of underscore) for you? Odd that Ubuntu would behave differently between yours and @mrssheep's setup.

p-j commented 10 years ago

@reywood nop, I made the change and added placeholders, which is a bit silly I guess, since the whole path is actually irrelevant and project dependent; not just these parts.

I'm not sure I understand your question with the colon and the underscore. Could you elaborate ?

reywood commented 10 years ago

@p-j Were you able to use:

@import '.meteor/local/build/programs/server/assets/packages/reywood:bootstrap3-sass/bootstrap';

Or did you have to use:

@import '.meteor/local/build/programs/server/assets/packages/reywood_bootstrap3-sass/bootstrap';

Note that the first has reywood:bootstrap3-sass and the second has reywood_bootstrap3-sass.

p-j commented 10 years ago

Oh, I use the first one, it works great. The one with the underscore doesn't work.

p-j commented 10 years ago

Just updated to Meteor 0.9.2.1 and had to change to @import '.meteor/local/build/programs/server/assets/packages/reywood_bootstrap3-sass/bootstrap'; otherwise I had the error mentionned above.

The meteor reset && meteor still triggers an error on the first start, triggering a new compilation fixes it.

Edit: see this comment

reywood commented 10 years ago

Updated package with new folder naming convention.