起因是我换了电脑,将代码从git上把代码down下来之后

yarn //安装依赖 等同于install
npm run serve //运行程序

先报了一个错误,分析原因是node版本过高,node-sass不支持,然后我看了一下当前电脑版本node@17.+,之前的电脑版本node版本是 v14.16.1,接下来想那就版本一致吧,

Mac切换node版本

npm install -g n //安装n node版本管理
sudo n 14.16.1 //  切换安装到node@14.16.1版本

然后运行代码后,报了如下错误

error: Missing binding YOUR_PROJECT_PATH/node_modules/node-sass/vendor/darwin-x64-72/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 12.xFound bindings for the following environments:- OS X 64-bit with Node.js 12.xThis usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.

按照提示尝试执行 npm install  和 npm rebuild node-sass 无果后换个思路解决问题。

问题解析:

在目录下 找不到darwin-x64-72/binding.node文件 那我们解决这个问题就好了

解决办法:

1、找到node-sass链接,进入url:https://github.com/sass/node-sass/releases

2、 下载指定版本:在页面中找到报错中你需要的版本,下载到本地

3、在.../node_modules/node-sass/vendor目录下新建目录 darwin-x64-72,将下载的文件放在此目录下,并更名为binding.node。(按照个人需求将下载的文件发在指定目录下)

4、重新运行代码,大功告成!

Missing binding node_modules/node-sass/vendor/darwin-x64-72/binding.node相关推荐

  1. Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 10.x

    Node Sass could not find a binding 错误示例 error in ./src/components/BaseLayout.vue?vue&type=style& ...

  2. Node Sass could not find a binding for your current environment

    typescript引入css直接报错: Node Sass could not find a binding for your current environment 具体错误如下: ERROR i ...

  3. 解决Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 14.x

    今天在新的开发环境检出nodejs的前端项目,运行npm run serve启动项目后报: > Node Sass could not find a binding for your curre ...

  4. Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js

    > Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 出现 ...

  5. vue:关于vue服务启动num run serve报Error: Missing binding Node Sass could not find 问题

    报错日志为: Error: Missing binding ...\node_modules\node-sass\vendor\win32-x64-83\binding.node Node Sass ...

  6. Node Sass找不到您当前环境的绑定

    本文翻译自:Node Sass couldn't find a binding for your current environment I am having issues building an ...

  7. node sass编译报错 记录

    很久之前得一个项目,久到遗忘了发版方式(源码和打包代码分离了之后发版的,嵌套在另一个项目内)...最近加了一个需求,不得不重新来触碰它. 找到代码,修改.编译...发现控制台报出了一大堆错误,找到核心 ...

  8. HBuilderX 安装 scss/sass编译 插件报错 binding.node 解决方案windows版

    HBuilderX 安装 scss/sass编译 插件报错 binding.node 解决方案windows版 官方给出的解决方案 让我们在命令行执行下面三行代码 [0;31m--> LibSa ...

  9. Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runt

    重新搭建开发环境,运行报错,日志如下: Error: Node Sass does not yet support your current environment: Windows 64-bit w ...

最新文章

  1. 使用np.load()加载数据 报错 Object arrays cannot be loaded when allow_pickle=False
  2. Android深度探索读书笔记 第六章
  3. Eclipse运行Applet没有显示图片,getCodeBase,getDocumentBase
  4. BZOJ 1786 DP
  5. TypeError at / 'AnonymousUser' object is not iterable
  6. groupby java_Java8的groupBy实现集合的分组
  7. 你的微信还安全吗?揭露清理僵尸粉的连环骗局
  8. Uranus Ex通过完善自身,影响更广阔的金融衍生品市场
  9. redis 缓存击穿及应对
  10. 【PCB学习笔记】绘制智能车四层板 --- PCB封装库的创建方法及现有封装调用
  11. Android中加载Gif动画
  12. python复数运算程序_python复数及计算法则
  13. 谷歌发布菲律宾街景地图
  14. c语言且不用 怎么表示,“并且”用C语言怎么表示
  15. git仓库-客户端软件安装配置过程
  16. python函数快查快用
  17. as3压缩解压缩的第三方包及实现DEMO
  18. 超适合新手练习的前端网页
  19. 操作系统经典独木桥问题
  20. BUAA_数据结构_2nd_小型图书管理系统

热门文章

  1. 前端学习(2929):vue改变多个样式的组合
  2. [css] 怎样去除图片自带的边距?
  3. [css] 说说display:none和visibility:hidden的区别
  4. 工作191:loading不声明
  5. 前端学习(1802):前端调试之事件伪类
  6. 第一百二十九期:阿里内部员工,排查Java问题常用的工具单
  7. Git(2):安装和使用
  8. 第三十七期:为什么2019年人工智能算法岗求职竞争如此激烈?
  9. 6用NetBeans进行JSP开发
  10. java学习(115):math方法