# ImportError: could not import sass

**URL:** https://discourse.roots.io/t/importerror-could-not-import-sass/25495
**Category:** sage
**Tags:** bud, sage10
**Created:** 2023-06-08T09:30:09Z
**Posts:** 5

## Post 1 by @JayLehtinen — 2023-06-08T09:30:09Z

I recently started a new project and followed the documentation to swap out Tailwind for Bootstrap. After several attempts to create and re-create the project following the instructions to the tee, I keep hitting the same road block.

```
[sage] › ✖ (node:74221) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)

 BudError 

✘ ImportError: could not import sass
problem running hook booted

☰ Stack trace
problem running hook booted
    at BudSass.import (node_modules/@roots/bud-sass/node_modules/@roots/bud-framework/lib/extension/index.js:257:19)
    at async BudSass.register (node_modules/@roots/bud-sass/lib/extension.js:12:32)
    at async BudSass._register (node_modules/@roots/bud-sass/node_modules/@roots/bud-framework/lib/extension/index.js:67:13)
```

Here’s the process and what I have tried so far:

- Creating a theme project with composer create-project
- Installing Acorn
- Configuring Dev URL and Soil
- Removing tailwind References
- Installing Bootstrap and popperjs

Build works to this point, 100%. The following is where it fails / doesn’t work:

- Setting up Support for Sass, per docs
- Installing Stylelint
- Updating Deps to latest
- Did the same process several times with both, Yarn and NPM
- Tried other small config tweaks to no avail

I am using MacOS with Apple M2 if that makes any difference.

Has anyone else encountered this or have any pointers where to look? Much appreciated!

---

## Post 2 by @MWDelaney — 2023-06-08T14:11:06Z

Does the advice in this thread help?

> [@Error setting up scss in fresh Sage installation](https://discourse.roots.io/t/error-setting-up-scss-in-fresh-sage-installation/25357):
>
> Hi. I try to setup scss/sass in a fresh sage 10.4.1 installation. Steps i did: yarn add @roots/bud-sass --dev this leads to bud.postcss.set is not a function after running yarn dev + changed app.css to app.scss then i did yarn add @roots/bud-postcss --dev this leads to bud.dashboard.setRenderer is not a function how do i get scss running

---

## Post 3 by @ben — 2023-06-08T15:38:50Z

Looks like there’s an upstream bug in Sass that appeared in the most recent version they published yesterday

[https://github.com/roots/bud/issues/2311#issuecomment-1582844181](https://github.com/roots/bud/issues/2311#issuecomment-1582844181)

---

## Post 4 by @JayLehtinen — 2023-06-08T16:50:43Z

Thanks for the responses.

This was definitely a bug in Sass. Downgrading to an earlier version solved the issue.

---

## Post 5 by @quasi_computerer — 2023-07-21T11:34:35Z

Another solution which doesn’t require downgrading is to use the “resolutions” key in your package.json.

```
"resolutions": {
    "**/sass": "1.62.0"
  }
```

You’ll probably need to `rm -rf node_modules && yarn install` afterwards, but this will enable all devDependencies and peerDependencies of your packages to share the same version of sass (provided it meets criteria).
