Node-sass is not recognized by command line

后端 未结 5 1900
情深已故
情深已故 2021-02-07 14:16

I\'m trying to set up node-sass, following the instructions on CSS-Tricks. Node and npm are installed correctly, and the node-sass installation worked too. When I go to run

5条回答
  •  没有蜡笔的小新
    2021-02-07 14:39

    node-sass v4.13+

    1. Install node-sass in your project locally
    cd 
    yarn add -D node-sass
    // or
    npm install -D node-sass
    
    1. Add a script to your package.json
    "scripts" : {
    ...
      "compile:sass": "node-sass --recursive --watch  --output ",
    ...
    }
    
    1. Run the script from the command line
    yarn compile:sass
    // or
    npm run compile:sass
    

提交回复
热议问题