node版本升级后node-sass相关报错解决方法
node-sass
:rainbow: Node.js bindings to libsass
项目地址:https://gitcode.com/gh_mirrors/no/node-sass
·
前两天将node版本从7升到10后 运行代码报错
[error] ./client/styles/common.scss
Module build failed: Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.sassLoader (/usr/local/yapi/vendors/node_modules/sass-loader/lib/loader.js:24:22)
@ ./client/index.js 7:0-31
按照错误提示 安装 node-sass 依赖包报错 Error: EACCES: permission denied…
这时需要执行以下命令才能安装成功
npm install node-sass --unsafe-perm=true --allow-root
:rainbow: Node.js bindings to libsass
最近提交(Master分支:7 个月前 )
6081731a
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com> 1 年前
62c0f46c
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com> 1 年前
更多推荐





所有评论(0)