reactjs - 如何安装节点 sass?
问题描述
我有节点 - 14.15.4 和 npm - 6.14.10
我正在学习 React,我想使用 reactstrap。但它向我显示了这个错误Error: Node Sass version 5.0.0 is incompatible with ^4.0.0.
。所以我试试这个:
npm install --save node-sass@4
现在我有这个错误:
npm WARN bootstrap@4.5.3 requires a peer of jquery@1.9.1 - 3 but none is installed.
You must install peer dependencies yourself.
npm WARN create-react-context@0.3.0 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed.
You must install peer dependencies yourself.
npm WARN react-popper@1.3.7 requires a peer of react@0.14.x || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.19.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path ..\ReactApp\first_app\my-app\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink '..\ReactApp\first_app\my-app\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node'
npm ERR! [OperationalError: EPERM: operation not permitted, unlink '..\ReactApp\first_app\my-app\node_modules\.node-sass.DELETE\vendor\win32-x64-83\binding.node'] {
npm ERR! cause: [Error: EPERM: operation not permitted, unlink '..\ReactApp\first_app\my-app\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: '..\\PROJECTS\\ReactApp\\first_app\\my-app\\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: '..\PROJECTS\\ReactApp\\first_app\\my-app\\node_modules\\.node-sass.DELETE\\vendor\\win32-x64-83\\binding.node',
npm ERR! parent: 'my-app'
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! ..\AppData\Roaming\npm-cache\_logs\2021-01-12T15_27_11_966Z-debug.log
PS ..\PROJECTS\ReactApp\first_app\my-app>
解决方案
尝试安装“npm install node-sass@4.14.0”
推荐阅读
- simulation - 模型创建期间出错 无法创建 NativeRL 处理器。原因:在 Anylogic 中的 airport10.Main.actions 类中找不到本地类
- vue.js - 如何将服务工作者中的事件接收到的数据导出到vue组件?
- mysql - docker - 如何将 mysql 数据从本地迁移到 ec2 实例
- anaconda - Anaconda 安装的 PyTorch 在尝试访问 GPU 时抛出运行时错误
- javascript - 验证时如何一次发送多个错误?
- python - 使用 Discord.py 机器人运行 Flask/Quart 应用程序
- javascript - innerHTML 更改为更长的文本后,段落不可滚动?
- sql - 表中的 SQL 行具有相等的概率
- icons - 关于 PageSpeed Insights 上的图标的问题
- c# - Blazor 不会在类更改时重新渲染