-
Notifications
You must be signed in to change notification settings - Fork 127
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
File to import not found or unreadable: ~_variables.sass in Gatsby.js #74
Comments
Hi @stefl Yes, can you add this to the docs? Thanks |
Based on issue couds#74, I've adjusted the Readme to include: * Additional info on the Gatsby setup * Making it clearer you may need to make a `_variables.sass` file even if you don't want to override styles * Made it clearer that the path needs to end in _variables.sass - that was ambiguous when I was trying to use this
Based on issue #74, I've adjusted the Readme to include: * Additional info on the Gatsby setup * Making it clearer you may need to make a `_variables.sass` file even if you don't want to override styles * Made it clearer that the path needs to end in _variables.sass - that was ambiguous when I was trying to use this
@couds The documentation provided is for Gatsby.js v1. For Gatsby.js v2 the following should be documented @ line 142 of For Gatsby.js v2 you can add a
Happy to make a PR... |
Yes please =) |
@couds no access to repo... Add me as a collaborator and I'll push my branch asap. |
@brandonratz the way to do this is to fork the repo onto your own account, make the commit there and then you should see a "new pull request" button top right in the UI. |
Spent few hours on this... to realize that order matters. If it helps anyone: Gatsby version: 4.1.2 src/styles/layout.scss:
src/components/Layout/index.tsx:
src/styles/_variables.sass
|
I'm attempting to use react-bulma-components with a new Gatsby.js site.
After installing, importing any component, I get the error that
~_variables.sass
is not found.My intention is just to use the default styles to get going, but it seems that I'm missing how to specify this path, or indeed that the SASS setup for my project doesn't seem to be correct. I have other SASS files that work as expected in this project.
Here's the error trace:
The solution is to add the following to Gatsby's
gatsby-node.js
file (assuming your _variables.sass file is insrc/style/_variables.sass
:Should I add a section to the documentation to show this solution or to help resolve this gotcha?
The text was updated successfully, but these errors were encountered: