原来项目是node14的版本,现在用node16运行npm i 会报以下错误

node-sass@4.14.1 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.14.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR!
node

解决方法:换一下node的版本,如果有nvm直接切换一下即可。
npm i 的过程如果出现网络错误,可以换一下使用淘宝镜像
单独将sass的安装镜像切换成淘宝
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
将整个项目的装包镜像换成淘宝的
npm install --registry https://registry.npm.taobao.org

小记项目中出现的另一个问题:

Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat ‘C:\DumpStack.log.tmp’
通常不是问题的关键

以上报错通常不是问题的关键,我这的问题是引入了未知的文件,可能是手滑误引入了不存在的文件。

GitHub 加速计划 / no / node-sass
10
0
下载
:rainbow: Node.js bindings to libsass
最近提交(Master分支:2 个月前 )
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 年前
Logo

新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐