'Node Sass setup

I am trying to set up development for node-sass but I keep getting "6 packages are looking for funding" which affects anytime I run npm run sass, and I get back errors. I installed [email protected]

$ npm install [email protected]
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported

> [email protected] install C:\Users\Ogunleye Oluwafemi D\Documents\Quiz\node_modules\node-sass     
> node scripts/install.js

Cached binary found at C:\Users\Ogunleye Oluwafemi D\AppData\Roaming\npm-cache\node-sass\4.14.1\win32-x64-83_binding.node

> [email protected] postinstall C:\Users\Ogunleye Oluwafemi D\Documents\Quiz\node_modules\node-sass 
> node scripts/build.js

Binary found at C:\Users\Ogunleye Oluwafemi D\Documents\Quiz\node_modules\node-sass\vendor\win32-x64-83\binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.

+ [email protected]
added 193 packages from 143 contributors and audited 193 packages in 93.003s

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Error code for npm run sass is below
[email protected] sass C:\Users\Ogunleye Oluwafemi D\Documents\Quiz
> node-sass -w scss/ -o dist/css/ --recursive

internal/fs/utils.js:298
    throw err;
    ^

Error: ENOENT: no such file or directory, lstat 'scss/'
    at Object.lstatSync (fs.js:1033:3)
    at Object.module.exports.parseDir (C:\Users\Ogunleye Oluwafemi D\Documents\Quiz\node_modules\sass-graph\sass-graph.js:153:10)
    at Object.watcher.reset (C:\Users\Ogunleye Oluwafemi D\Documents\Quiz\node_modules\node-sass\lib\watcher.js:17:21)
    at watch (C:\Users\Ogunleye Oluwafemi D\Documents\Quiz\node_modules\node-sass\bin\node-sass:260:20)
    at run (C:\Users\Ogunleye Oluwafemi D\Documents\Quiz\node_modules\node-sass\bin\node-sass:319:5)
    at Object.<anonymous> (C:\Users\Ogunleye Oluwafemi D\Documents\Quiz\node_modules\node-sass\bin\node-sass:405:3)
    at Module._compile (internal/modules/cjs/loader.js:1256:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1277:10)
    at Module.load (internal/modules/cjs/loader.js:1105:32)
    at Function.Module._load (internal/modules/cjs/loader.js:967:14) {
  errno: -4058,
  syscall: 'lstat',
  code: 'ENOENT',
  path: 'scss/'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] sass: `node-sass -w scss/ -o dist/css/ --recursive`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] sass script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ogunleye Oluwafemi D\AppData\Roaming\npm-cache\_logs\2021-01-03T03_04_02_498Z-debug.log

Any solution or any other way of setting up sass on vscode that will still function the normal way sass functions


Solution 1:[1]

Node-Sass is now offically depricated. Switch to Dart-Sass instead, which is not only the maintained, but also the more feature-rich version. You can find a guide on how to install on their website.

Solution 2:[2]

I faced the similar issue in my local HTML Project. You should make following changes:

  1. You should uninstall node-sass first.

    npm uninstall node-sass
    
  2. Install sass as dev dependency.

    npm install sass --save-dev
    
  3. Update your script in package.json

    sass -w scss/ -o dist/css/ --recursive
    

This will fix the issue in most of the cases.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Simplicius
Solution 2 Imran Rafiq Rather