当前位置:网站首页>uniapp项目启动报错 binding.node is not a valid Win32 application 终极解决方案
uniapp项目启动报错 binding.node is not a valid Win32 application 终极解决方案
2022-07-19 11:16:00 【久远jy_naru】
出现问题的前提条件:
阅读 uniapp 官网的教程,快速上手阶段使用 hbuildx 进行项目搭建时,无法成功启动 uniapp 项目。
这个问题在网上有很多解答,但是大部分都说的很不清楚。
在网上随便找了点代码复现错误:
[编译scss/sass] 15:48:25.231 Error: \\?\G:\HBuilderX\plugins\compile-node-sass\node_modules\node-sass-china\vendor\win32-x64-64\binding.node is not a valid Win32 application.
[编译scss/sass] 15:48:25.231 \\?\G:\HBuilderX\plugins\compile-node-sass\node_modules\node-sass-china\vendor\win32-x64-64\binding.node
仔细观察可以发现 其实两次出现的这个路径都是同一个,我们直接去定位这个地方,会发现是这样的:
一个名为 win32 x64 -**(后续的数字可能时72也可能是64) 的文件夹下有一个binding.node 文件。
网上有一些教程给出的处理方法是:
使用该指令:
node -p "[process.platform, process.arch, process.versions.modules].join('-')"
进行 binding.node 版本查看然后再进行文件的版本替换。
注意!! 使用这个指令去查看的 binding.node 是全局的版本,它不一定是 uniapp 所需要的版本!!如果你把这个直接覆盖掉是会影响其他项目的,因为它是全局 binding ,不是我们 uniapp 的。
根据这个指令的版本号去下载 github 上的 binding 是会报错的!
那到底要去下载什么版本的binding呢?
正确的解决方案:
去 github 上下载对应的文件夹名称版本的 binding.node 并覆盖掉该文件夹下的 binding.node 即可。
这个处理方法是正确的。
如:我目前是 win32 x64 -72 文件夹下的 binding 文件报错,那么我要去 github 上下载 win32 x64 -72 版本的 binding.node 文件进行覆盖。
这样覆盖之后,uniapp就可以成功启动了。
边栏推荐
猜你喜欢
[latex] ppt Drawing, Export EMF format, word insert EMF file and export PDF, PDF cut and export EPS file, latex insert EPS file
Leetcode selected top interview questions_ character string
YOLOv7 训练报错 IndexError: list index out of range
USART serial communication
【深度】新派LaaS协议Elephant:重振DeFi赛道发展的关键
如何使用 SAP Intelligent Robotic Process Automation 自动操作 Excel
Use custom rrt* global planner to create map navigation
ADB调试工具的使用
0718-棉花棉纱涨停,市场大幅反弹
微服务注册中心怎么选?
随机推荐
北森控股IPO:三年合计亏损41.15亿,此前9轮融资合计28.4亿元
[latex] ppt Drawing, Export EMF format, word insert EMF file and export PDF, PDF cut and export EPS file, latex insert EPS file
Introduction to gateway
IPhone 14 Max production progress lags behind: or affect the delivery ratio of the first batch of products
SeasLog 与 monolog 日志系统的区别,SeasLog安装步骤[通俗易懂]
性能领域:你知道的越多,不知道的也就越多
mysql插入三表不同的值,关联条件是主外键,插入语句语法如何?
密码太多不知道怎么记录?不如自己写个密码箱小程序
如何使用 SAP Intelligent Robotic Process Automation 自动操作 Excel
[wechat applet] thousand hand float
扫描删除文件夹问题
OneFlow v0.8.0正式发布
sprigboot中过滤器执行顺序源码解读
【FAQ】接入HMS Core推送服务,服务端下发消息常见错误码原因分析及解决方法
Cooperatively Coevolving Particle Swarms forLarge Scale Optimization
【深度】新派LaaS协议Elephant:重振DeFi赛道发展的关键
熔断、降级 Sentinel
【PPT】连续使用箭头等工具,避免多次重复选择,提升效率
【单片机】51单片机烧录那些事儿
process.env