vue项目配置出错,项目重新安装依赖。

问题描述1:
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if “python” can be used
gyp ERR! find Python - “python” is not in PATH or produced an error
gyp ERR! find Python checking if “python2” can be used

问题解决:
缺少:python2.7
1.官网安装:(https://www.python.org/download/releases/2.7/),但是需要手动配置环境变量
2.命令行运行:npm install --global --production windows-build-tools,一定要等待完全运行完成,可以在环境变量中看到,Python的配置。
如下:C:\Users\Administrator.windows-build-tools\python27
配置环境变量的位置:右键“此电脑”->属性>高级系统设置>高级>环境变量>Administrator部分。

问题描述2:
window系统在npm install 安装项目依赖的时候,报错(或警告)
SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
安装fsevents依赖包报错。如果package.json配置中没有fsevents,忽略警告就可以。
也可以尝试以下几种方式:
第一:
1.清除npm 缓存,npm cache clean --force(mac系统加上 sudo)
2.删除node_modules文件,手动或rm -rf node_modules (window 运行不通过,去掉-rf)
3.重新安装:npm install
第二:
删除某个插件:npm uninstall xxx

问题描述3:
Error: Load config Error!
at Object. (D:\project1\bbnmsui\build\config.js:35:11)
at Module._compile (internal/modules/cjs/loader.js:1236:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1257:10)
at Module.load (internal/modules/cjs/loader.js:1085:32)
at Function.Module._load (internal/modules/cjs/loader.js:950:14)
at Module.require (internal/modules/cjs/loader.js:1125:19)
at require (internal/modules/cjs/helpers.js:75:18)
问题解决:
配置文件应用了_dev.js文件,项目从远程仓库下载,需要建一个_dev.js设置代理,如果运行npm install 没有报错,运行npm run dev 报错,可能就是_dev.js没有创建或是放的位置不对。全局搜索_dev.js,看哪个地方引用或说明了;或可以查看.gitignore文件,是否记录了原本的_dev.js放在哪里(如果是相对路径,从.gitignore所处的当前路径来推断)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值