最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

reactjs - Vite, React, SCSS - Can't add SCSS (Embedded Dart Sass couldn't find the embedded compiler executable)

matteradmin13PV0评论

Current setup is below.

Using this in package.json / devDependancies:

"sass-embedded": "^1.83.4",

Folder setup:

component.tsx
component.scss

In component.tsx:

import './component.scss';

In vite.config.ts:

css: {
preprocessorOptions: {
  scss: {
    api: 'modern-compiler',
  }
}

},

I keep getting this error message:

plugin:vite:css] [sass] [sass] [sass] [sass] [sass] [sass] [sass] Embedded Dart Sass
couldn't find the embedded compiler executable. Please make sure the optional 
dependency sass-embedded-linux-musl-x64 is installed in node_modules.

The sass-embedded-linux-musl-x64 part doesn't make sense either, as I'm on a Windows PC using Docker.

I've followed the docs here (/guide/features#css-pre-processors), and read a number of other examples, and none of them seem to address this issue.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far