css - 无法安装 sass
问题描述
我尝试安装 node-sass 并且它可以工作,但是 main.scss 中的代码不会自动传输到 style.css 中,然后我删除了包括 package.scss 在内的所有文件并尝试重新安装 node-sass,但我得到了这些错误。
PS D:\web course\iti\bootstrap\sass> npm install node-sass
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
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic.
See https://v8.dev/blog/math-random for details.
npm WARN sass@1.0.0 No description
npm WARN sass@1.0.0 No repository field.
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path D:\web course\iti\bootstrap\sass\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\web course\iti\bootstrap\sass\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node'
npm ERR! [OperationalError: EPERM: operation not permitted, unlink 'D:\web course\iti\bootstrap\sass\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node'] {
npm ERR! cause: [Error: EPERM: operation not permitted, unlink 'D:\web course\iti\bootstrap\sass\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'D:\\web course\\iti\\bootstrap\\sass\\node_modules\\.node-sass.DELETE\\vendor\\win32-x64-83\\binding.node'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'D:\\web course\\iti\\bootstrap\\sass\\node_modules\\.node-sass.DELETE\\vendor\\win32-x64-83\\binding.node',
npm ERR! parent: 'sass'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\TECH VALLEY\AppData\Roaming\npm-cache\_logs\2021-08-11T14_25_50_073Z-debug.log
PS D:\web course\iti\bootstrap\sass>
解决方案
尝试
npm uninstall node-sass
然后再次安装
推荐阅读
- sql - 获取每个项目的最大日期(最后销售日期)列,否?
- vue.js - 如何从 Vuex 中的突变或操作中调用共享辅助函数
- javascript - JS - 间隔后更改 HREF
- c - 如何将结构数组的每个元素传递给函数?
- mysql - 如果给定一个过程,则创建一个表
- javascript - 在 Timer 中以两位数显示小时、分钟和秒
- rest - 为支持不同 ID 的 GET 请求设计 REST 端点
- ruby-on-rails - Ruby(/Rails) 日期 - 双周和季度 DateTime 范围
- c# - 如何使用 DataContractSerializer 自定义字典序列化?
- javascript - 如何将分布数组放入数组数组中?