There are several related questions to mine, but none that have fixed my issue.
Context
I’m trying to use yarn create next-app
(which I thought comes with Sass) to build a web app and then use yarn add sass
to add sass support. However, I keeping seeing this error:
To use Next.js' built-in Sass support, you first need to install `sass`.
Run `npm i sass` or `yarn add sass` inside your workspace.
Steps to reproduce:
- Run
yarn create next-app
, - Name the project
next-sass-test
, - Otherwise use the default options the CLI gives you,
- Run
cd next-sass-test
, - Run
mv page.module.css page.module.scss; rm page.module.css
(to change the file extenion), - Run
yarn add sass
at the project root level, - Run
next build
, - See that it displays the above error,
- Run
yarn add sass
again and we’re back to step 8.
I have also tried yarn add node-sass
to no avail.
1