skip to Main Content

I’m building a react app using sass

I wrote to terminal:

npx create-react-app .

then I wrote

    npm install -g sass



    Require stack:
    - D:internneonode_modulessass-loaderdistutils.js
    - D:internneonode_modulessass-loaderdistindex.js
    - D:internneonode_modulessass-loaderdistcjs.js
    - D:internneonode_modulesloader-runnerlibloadLoader.js
    - D:internneonode_modulesloader-runnerlibLoaderRunner.js
    - D:internneonode_moduleswebpacklibNormalModule.js
    - D:internneonode_moduleswebpack-manifest-plugindistindex.js
    - D:internneonode_modulesreact-scriptsconfigwebpack.config.js
    - D:internneonode_modulesreact-scriptsscriptsstart.js

2

Answers


  1. It seems like you have a problem with the project (D:internneo) configuration.

    If you want to install sass globally, go to the terminal and then run the command npm i -g sass with administrator privilege.

    If the package is installed properly, go to your neo project remove node_modules dir and package-lock.json file and then run npm i within the directory.

    Login or Signup to reply.
  2. You need to install node-sass instead of sass. Run the following commands and it should fix the issue

    npm uninstall sass
    npm install node-sass
    

    Also, it won’t harm to see if your sass-loader needs to be updated

    npm install sass-loader@latest
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search