【node】Node快速切换版本(降级、升级)亲测有效——(使用node16运行14 node-sass报错、使用node14运行16 Cannot find module ‘node:path‘)

使用node16运行14 node-sass报错、使用node14运行16 Cannot find module ‘node:path’)

  • 选择性使用
# 全局安装n
npm install -g n
# 安装最新稳定版 node
n stable
# 安装最新版本 node
n latest
# 安装某个具体node版本
n 14.16.1
# 删除某个版本
n rm 14.16.1
# 查看安装路径
n which 14.16.1
# 切换版本
n
# 若切换失败可使用
sudo n
# 以指定的版本来执行脚本
n use 14.16.1  test.js
# 查看已经安装的版本
n ls
# 查看服务器上所有可用的版本
n ls-remote --all

【node】Node快速切换版本(降级、升级)亲测有效——(使用node16运行14 node-sass报错、使用node14运行16 Cannot find module ‘node:path‘)_第1张图片
【node】Node快速切换版本(降级、升级)亲测有效——(使用node16运行14 node-sass报错、使用node14运行16 Cannot find module ‘node:path‘)_第2张图片
【node】Node快速切换版本(降级、升级)亲测有效——(使用node16运行14 node-sass报错、使用node14运行16 Cannot find module ‘node:path‘)_第3张图片
【node】Node快速切换版本(降级、升级)亲测有效——(使用node16运行14 node-sass报错、使用node14运行16 Cannot find module ‘node:path‘)_第4张图片

参考
https://blog.csdn.net/u014796929/article/details/123257103

你可能感兴趣的:(sass,前端,css)