栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

vue2.9升级最新版本,node升级12.0以上版本,解决Can‘t find Python executable “python“错误

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

vue2.9升级最新版本,node升级12.0以上版本,解决Can‘t find Python executable “python“错误

1、先升级vue2.0至vue3.0
1、卸载现在的vue
	npm uninstall vue-cli -g
	
2、升级vue至最新版本
	npm install -g @vue/cli
	
3、运行vue -V 查看版本是否更新
	vue -V
2、下载node 10.0以上版本

1、node以往版本地址:https://nodejs.org/zh-cn/download/releases/

	https://nodejs.org/zh-cn/download/releases/

2、找到所需版本点击下载,进入下载页面,点击node-v16.8.0-x64.msi(下载自己需要的版本) 下载安装
3、安装成功以后 cmd 运行 node -v 查看版本

	node -v
3、npm run dev 报错:Cannot find module ‘node-sass’

安装 node-sass报错 Can’t find Python executable “python”,然后进行一下操作

1、cmd 管理员运行
 npm install --global --production windows-build-tools
 
2、安装 npm install --global node-gyp
以上都运行成功但是还是报错 Can't find Python executable "python", you can set the PYTHON env variable

3、最后运行:npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
可以正常启动项目了

疑问:我的所有项目都可以npm install 成功了,也可以运行。但是我安装镜像node-sass只在一个项目中安装了,其他几个项目都是报错python,我并没有去安装 node-sass 。这儿有点不太清楚是怎么回事儿
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1026180.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号