Skip to content
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

Unable to find node_modules #166

Open
nfMalde opened this issue Feb 24, 2023 · 1 comment
Open

Unable to find node_modules #166

nfMalde opened this issue Feb 24, 2023 · 1 comment

Comments

@nfMalde
Copy link

nfMalde commented Feb 24, 2023

  • 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:

  1. Open the sample project
  2. Open File _fa.scss
  3. CTRL + Click on a path for example "@fortawesome/fontawesome-free/scss/fontawesome.scss"
  4. 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"
  5. Tide (~) is not an option anymore since angular 13+ does not allow that anymore / doesnt support it and throws errors.
  6. Using the full path works however: "@import "../../../node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss"
@hossammourad
Copy link

Go to the settings of the extension and make sure node_modules is not on this list:

CleanShot 2023-04-03 at 14 15 00

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

No branches or pull requests

2 participants