【问题标题】:Node Sass setup节点 Sass 设置
【发布时间】:2021-01-03 03:08:01
【问题描述】:

我正在尝试为 node-sass 设置开发,但我不断收到“6 个软件包正在寻找资金”,这会影响我运行 npm run sass 的任何时间,并且我会返回错误。我安装了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:\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

> node-sass@4.14.1 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 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:\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! 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:\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

【问题讨论】:

标签: node.js npm sass


【解决方案1】:

Node-Sass 现已正式弃用。改用 Dart-Sass,它不仅是维护的,而且是功能更丰富的版本。您可以在他们的website 上找到有关如何安装的指南。

【讨论】:

    猜你喜欢
    • 2017-09-08
    • 1970-01-01
    • 2017-12-01
    • 2018-05-08
    • 1970-01-01
    • 2012-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多