Can't find stylesheet to import
See original GitHub issue🐛 bug report
Can’t import any node_module to scss file. Tried like:
@import 'bourbon';
@import '~/bourbon/core/_bourbon.scss';
@import '~/node_modules/bourbon/core/_bourbon.scss';
🎛 Configuration (.babelrc, package.json, cli command)
No configs was used
🤔 Expected Behavior
Guess what…
😯 Current Behavior
🚨 /src/layouts/main/MainLayout.scss:2:9: Can't find stylesheet to import.
╷
2 │ @import '~/node_modules/bourbon/core/_bourbon.scss';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
src/layouts/main/MainLayout.scss 2:9 root stylesheet
💁 Possible Solution
Works only if I enter path like
@import '~node_modules/bourbon/core/bourbon';
/* or this */
@import '~bourbon/core/_bourbon.scss';
NOTE no
/
after~
But in documentation its not mentioned
🔦 Context
💻 Code Sample
https://github.com/FDiskas/parcel-bug
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 1.12.3 |
Node | v10.16.0 |
npm/Yarn | 6.9.0/1.16.0 |
Operating System | Fedora (LINUX) |
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Sass "Error: Can't find stylesheet to import." - Stack Overflow
It seems like this is a path issue; _functions.scss is in the same directory as bootstrap.scss in node_modules/bootstrap/scss , but it seems ...
Read more >Error: Can't find stylesheet to import. · Issue #3269 - GitHub
use the proper relative import (i.e. @import "abstracts/reset" ); define a load path from which imports can be resolved (which might be what ......
Read more >Executing Sass - Can't find stylesheet to import - Syncfusion
Hi :) I'm currently trying to do the following: code.png. So I import the base styles, then I override some scss variables, and...
Read more >SCSS Error: Can't find stylesheet to import.
the error comes from SASS compiler, not from the IDE. IDE tricks, like marking folders as Resource roots, won't work here, the compiler...
Read more >Laravel NPM run Dev error "Can't find stylesheet to import."
node_modules/sass-loader/dist/cjs.js): SassError: Can't find stylesheet to import. @import "~compass/css3"; I already installed compass and compass-mixins.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m sorry I totally forgot about workaround. But still it’s not works as it’s supposed to
@FDiskas I doubt we’ll fix this in Parcel 1, we’ve been tweaking and changing this quite a lot and changing this again would be a breaking change.
Parcel 2 will hopefully be more reliable for this, we’re still trying to figure out how we should handle this properly due to the various different standards for these imports. Even with webpack and postcss import you can define your own prefix. Maybe we should just default to the node.js standard and allow this to be customized using postcss plugins.