I created a new VUE 3 and typescript application using vite. I later installed primevue and primeflex. When I run npm run dev, I get the error seen below:
How do I fix this? My repo, if that will shed light.
Install the sass package.
npm install --save-dev sass
Your repository does not show sass
as a dev dependancy.
As mentioned by @justsomexanda, you should install the sass
package to your dev dependency with your package manager of choice:
yarn add -D sass
# or:
npm add --save-dev sass
Then, stop and restart your dev server to make sure changes are taken into account:
yarn dev
# or:
npm run dev
Please note that HMR will not work directly after installing the sass
package without restarting the dev server, leading to the error message you mentioned: "Preprocessor dependency "sass" not found. Did you install it?".
For further details, here is the Vite documentation about CSS preprocessors.
If you're using Vite JS and installing Sass for the project.
Follow the below commands to make it work:
npm add --save-dev node-sass
OR yarn add --save-dev node-sass
npm add --save-dev sass
OR yarn add --save-dev sass
Now run development and check.
Share errors in the comments if you're still getting any errors.