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

Vite 2.4.x cannot find SASS when using Nuxt-Vite #4557

Closed
7 tasks done
selfagency opened this issue Aug 9, 2021 · 4 comments · Fixed by #4853
Closed
7 tasks done

Vite 2.4.x cannot find SASS when using Nuxt-Vite #4557

selfagency opened this issue Aug 9, 2021 · 4 comments · Fixed by #4853
Labels
bug: upstream Bug in a dependency of Vite

Comments

@selfagency
Copy link

Describe the bug

Even with SASS properly installed and present in package.json, Vite says SASS is not installed.

Reproduction

https://githubbox.com/selfagency/vite-sass-error

System Info

System:
    OS: macOS 11.5
    CPU: (12) x64 Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
    Memory: 10.27 GB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.4 - /usr/local/opt/node@14/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 6.14.14 - /usr/local/opt/node@14/bin/npm
  Browsers:
    Chrome: 92.0.4515.107
    Edge: 92.0.902.67
    Firefox Developer Edition: 91.0
    Safari: 14.1.2

Used Package Manager

npm

Logs

ERROR  Preprocessor dependency "sass" not found. Did you install it?                                     09:56:34

  at loadPreprocessor (node_modules/vite/dist/node/chunks/dep-c1a9de64.js:28714:15)
  at scss (node_modules/vite/dist/node/chunks/dep-c1a9de64.js:28719:20)
  at compileCSS (node_modules/vite/dist/node/chunks/dep-c1a9de64.js:28459:40)
  at async TransformContext.transform (node_modules/vite/dist/node/chunks/dep-c1a9de64.js:28113:50)
  at async Object.transform (node_modules/vite/dist/node/chunks/dep-c1a9de64.js:50939:30)
  at async transformRequest (node_modules/vite/dist/node/chunks/dep-c1a9de64.js:66763:29)
  at async warmup (node_modules/nuxt-vite/dist/nuxt-vite.js-vite.js:386:5)
  at async Promise.all (index 6)
  at async warmup (node_modules/nuxt-vite/dist/nuxt-vite.js-vite.js:388:5)
  at async Promise.all (index 8)
  at async warmup (node_modules/nuxt-vite/dist/nuxt-vite.js-vite.js:388:5)
  at async Promise.all (index 4)
  at async warmup (node_modules/nuxt-vite/dist/nuxt-vite.js-vite.js:388:5)
  at async Promise.all (index 0)
  at async warmupViteServer (node_modules/nuxt-vite/dist/nuxt-vite.js-vite.js:390:3)

Validations

@sodatea
Copy link
Member

sodatea commented Aug 10, 2021

Somehow require.resolve.paths isn't available when nuxt-vite is executed.

Cc @pi0

@sodatea sodatea added bug: upstream Bug in a dependency of Vite and removed pending triage labels Aug 10, 2021
@sodatea sodatea changed the title Vite 2.4.x cannot find SASS Vite 2.4.x cannot find SASS when using Nuxt-Vite Aug 10, 2021
@selfagency
Copy link
Author

Any update on this?

@Shinigami92
Copy link
Member

@selfagency If there is no associated PR linked or no one else has responded here: usually the answer is no.

But this is labelled with upstream 🤔 So you may currently ask in the wrong repo and go tackle the source of the problem instead of monkey-patch it in vite

@patak-dev
Copy link
Member

Commenting here to link to open issue in nuxt-vite nuxt/vite#162

@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: upstream Bug in a dependency of Vite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants