Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
95 views
in Technique[技术] by (71.8m points)

node.js - 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 node-sass@4.14.1

$ npm install node-sass@4.14.1
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> node-sass@4.14.1 install C:UsersOgunleye Oluwafemi DDocumentsQuiz
ode_modules
ode-sass     
> node scripts/install.js

Cached binary found at C:UsersOgunleye Oluwafemi DAppDataRoaming
pm-cache
ode-sass4.14.1win32-x64-83_binding.node

> node-sass@4.14.1 postinstall C:UsersOgunleye Oluwafemi DDocumentsQuiz
ode_modules
ode-sass 
> node scripts/build.js

Binary found at C:UsersOgunleye Oluwafemi DDocumentsQuiz
ode_modules
ode-sassvendorwin32-x64-83inding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN quiz@1.0.0 No repository field.

+ node-sass@4.14.1
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
quiz@1.0.0 sass C:UsersOgunleye Oluwafemi DDocumentsQuiz
> 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:UsersOgunleye Oluwafemi DDocumentsQuiz
ode_modulessass-graphsass-graph.js:153:10)
    at Object.watcher.reset (C:UsersOgunleye Oluwafemi DDocumentsQuiz
ode_modules
ode-sasslibwatcher.js:17:21)
    at watch (C:UsersOgunleye Oluwafemi DDocumentsQuiz
ode_modules
ode-sassin
ode-sass:260:20)
    at run (C:UsersOgunleye Oluwafemi DDocumentsQuiz
ode_modules
ode-sassin
ode-sass:319:5)
    at Object.<anonymous> (C:UsersOgunleye Oluwafemi DDocumentsQuiz
ode_modules
ode-sassin
ode-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! quiz@1.0.0 sass: `node-sass -w scss/ -o dist/css/ --recursive`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the quiz@1.0.0 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:UsersOgunleye Oluwafemi DAppDataRoaming
pm-cache\_logs2021-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
question from:https://stackoverflow.com/questions/65546302/node-sass-setup

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...