vscode-scss
vscode-scss copied to clipboard
Unable to find node_modules
- VS Code Version: 1.74.4
- SCSS IntelliSense Version: 1.058.833
- Operating System: Windows 11 Pro Having an angular project with folder Structure like this:
.
node_modules
src/scss/vendor/_fa.scss
src/scss/main.scss
See: https://github.com/nfMalde/scss-minimal-sample where _fs.scss imports stylesheets from an package
@import "@fortawesome/fontawesome-free/scss/fontawesome.scss";
@import "@fortawesome/fontawesome-free/scss/solid.scss";
@import "@fortawesome/fontawesome-free/scss/regular.scss";
@import "@fortawesome/fontawesome-free/scss/brands";
Visual Studio Code cant resolve the path correctly to provide intellisense for variables and functions.
Reproducible Case:
Steps to Reproduce:
- Open the sample project
- Open File _fa.scss
- CTRL + Click on a path for example "@fortawesome/fontawesome-free/scss/fontawesome.scss"
- It will try to open it starting from directory of "_fa.scss" eg . "src/scss/vendor/@fortawesome/fontawesome-free/scss/fontawesome.scss" instead of "node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss"
- Tide (~) is not an option anymore since angular 13+ does not allow that anymore / doesnt support it and throws errors.
- Using the full path works however: "@import "../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss"
Go to the settings of the extension and make sure node_modules
is not on this list: