首先从官方网站下载node16.13,0稳定版。然后安装。

打开之前的项目,删掉包,然后开始npm install

node16.0版本 对应node-sass sass-loader 各个版本号

"node-sass": "^6.0.1",

"sass-loader": "^10.0.1"

npm install报错

npm ERR! code EINTEGRITY npm ERR! sha512-QysJYerzaGzvJ5iT61KpE4hFHiDU8NQ7QjSwIkOAJAx0KY8o0WCjLpAVvjmKtZqNXPBc5Jc3P+eeaz9qQPWNeQ==sha1-K+ASiJgLBY8JfSaBL2XU1OgTbMo= integrity checksum failed when using sha512: wanted sha512-QysJYerzaGzvJ5iT61KpE4hFHiDU8NQ7Q

解决办法就是npm install -g npm

在运行npm install -g @vue-cli

在vue -V输出:@vue/cli 4.x.x 说明@vue/cli 4安装成功( vue cli 3的版本会输出 3.x.x )

然后更新包vue upgrade

然后继续npm install

如果你在webstorm中直接使用以上命令发生报错

vue : 无法加载文件 C:\Users\hmy\AppData\Roaming\npm\vue.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Exe

cution_Policies。

所在位置 行:1 字符: 1

+ vue -V

+ ~~~

+ CategoryInfo : SecurityError: (:) [],PSSecurityException

+ FullyQualifiedErrorId : UnauthorizedAccess

则用管理员的身份进入到Windows PowerShell中

输入 set-ExecutionPolicy RemoteSigned运行

选择Y即可

GitHub 加速计划 / no / node-sass
10
0
下载
:rainbow: Node.js bindings to libsass
最近提交(Master分支:1 个月前 )
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,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐