1

I have npm 6.12.0 and node 12.13.0.

Every time I reopen the IDE and run my react app then I get the following error:

error

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: File to import not found or unreadable:
@material/elevation/mixins. on line 23 of
node_modules/@material/card/_mixins.scss from line 23 of
node_modules/@material/card/mdc-card.scss from line 23 of
node_modules/@material/react-card/index.scss from line 2 of
/tmp/build_8663a9ab7ca425b4dba37090160b2ed2/assets/src/scss/index.scss
@import "@material/elevation/mixins";

When I run:

SET SASS_PATH=.\node_modules

It goes away and the app works fine.

Why do I have to run this command again and again?

RobC
  • 22,977
  • 20
  • 73
  • 80
Farwa Ali
  • 11
  • 3
  • 1
    I believe you are using windows, so the issue is you have to set the system variable in your app package.json, or maybe system wide, check this: https://stackoverflow.com/questions/40806796/setting-environment-variables-package-json-in-windows-10 – ROOT Mar 16 '20 at 10:40

0 Answers0