node-sass-middleware is not installing on windows

1.4k views Asked by At

node-sass-middleware is not installing in my computer. I've tried almost every method to do so but nothing get hand.

It was saying to install latest version of python (I do), latest version of VS Code (I do) even after error is coming.

I've tried its alternative module node-sass but it does not match my need.

I want to setup this

const sassMiddleware = require('node-sass-middleware');
|
|
|
app.use(
     sassMiddleware({
        src: __dirname,
        dest: __dirname,
        debug: true,
        outputStyle: 'extended',
        prefix: '/css'
     })
);

I've tried to install node-sass-middleware but its giving me this error :

see the error here from my terminal

continue error here

2

There are 2 answers

0
HONESHWAR On

I found one way to use node-sass-middleware

Step1) download library from https://github.com/sass/node-sass-middleware

step2) extract it(if you download zip file) and now create an node-sass-middleware folder in node_module folder of your project

step3) copy all folders and files from an zip file(extract) and paste it inside node-sass-middleware folder(that we created in node_module FOLDER)

step4) now run your code in vs code for sass

0
Yarramsetti Durga Sai Ratna Ku On

Use that command to give root previlige to npm to make necessary changes. Hopefully this will resolve your issue.

npm install node-sass --unsafe-perm