VS Task Runner Explorer - Node Sass 找不到绑定

2024-02-27

打开 Visual Studio 任务运行程序资源管理器时,gulpfile.js加载失败,并且在“输出”窗口中发出此错误。

Failed to run "C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\node-sass\lib\binding.js:15
      throw new Error(errors.missingBinary());
      ^
Error: Missing binding C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\node-sass\vendor\win32-ia32-47\binding.node
Node Sass could not find a binding for your current environment: Windows 32-bit with Node.js 5.x
Found bindings for the following environments:
  - Windows 64-bit with Node.js 6.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
    at module.exports (C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\node-sass\lib\binding.js:15:13)
    at Object.<anonymous> (C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:397:26)
    at Object.Module._extensions..js (module.js:404:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\DATA\Git\MyApp\MyBiz.MyApp\MyBiz.MyApp.WebsiteCore\node_modules\gulp-sass\index.js:187:21)
    at Module._compile (module.js:397:26)

Running gulp运行任务并且我的 SASS 编译良好。

我尝试重新安装节点,我也确保只有一个npmrunnable 位于 Windows 路径中,我已删除node_modules文件夹并运行npm install也尝试过几次npm rebuild node-sass.

所有这些数百万个很酷的新前端工具和库似乎极大地拓宽了“可能出错的地方”的范围,与以前的项目相比,效率根本不高。

Luke


配置 VS 以使用较新版本的节点。

查找 Ryan Hayes 的说明,网址为将 Node.JS 安装版本与 Visual Studio 2015 同步 https://ryanhayes.net/synchronize-node-js-install-version-with-visual-studio-2015/

下面是说明的片段,以防链接失效。

我在 Visual Studio 之外更新了 Node.JS,但由于 VS 使用与任何外部安装分开的自己的安装,因此您可能会遇到 node_modules 包依赖性问题,其中一个版本的 npm 安装了一个包(这使得它依赖于该包) Node/npm 版本),然后您无法在其他版本中运行命令(它们会损坏)。具体来说,我遇到了 node-sass 和 windows 绑定的问题。解决方案是将 Visual Studio 指向我已经在 Visual Studio 外部设置的 Node.JS 版本。

  1. 首先,找到您已有的 Node.js 安装并在命令行中使用。

我已经安装了nodejsC:\Program Files (x86)\nodejs\.

  1. Go to 工具 > 选项在 Visual Studio 2015 中。
  2. 在此对话框中,转到项目和解决方案 > 外部 Web 工具打开管理 VS 中使用的所有 3rd 方工具的对话框。这就是 Node.js 所指的地方。
  3. Add an entry at the top to the path to the node.js directory to force Visual Studio to use that version instead. enter image description here
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

VS Task Runner Explorer - Node Sass 找不到绑定 的相关文章

随机推荐

  • 从解析中删除类/列时出现问题

    我试图从解析中删除一些不需要的列 我不断收到以下错误 错误 类名 Session 必须以字母解析开头 不确定为什么会发生这种情况 或者这是否是一个错误 当我删除一个类时 我也会收到此错误 有没有解决的办法 UPDATE 我刚刚尝试过 我能够
  • 如何使用 FFMPEG 驱动程序使 opencv 工作

    我的 linuxbox 上有一个摄像头 它运行良好 ls al dev video crw rw 1 root video 81 0 janv 8 16 13 dev video0 crw rw 1 root video 81 1 janv
  • Android获取JSON键值

    我对解析特定的问题有疑问json细绳 我没有找到任何对我的情况有帮助的东西 我有这个 json AM country name Armenia data 180854 time published 2012 03 30 13 31 39 t
  • 使用 C API 访问 NumPy 数组的视图

    在我用 C 编写的 Python 扩展模块中 我使用以下代码片段将 NumPy 数组转换为犰狳 http arma sourceforge net 用于代码的 C 部分的数组 static arma mat convertPyArrayTo
  • Django 查询集按 ISO 周数过滤

    我有一个模型 其中包含datefield 我正在尝试获取包含本周 从星期一开始 的模型的查询集 所以自从姜戈datefield包含简单的datetime date我假设使用的模型进行过滤 isocalendar 从逻辑上讲 这正是我想要的
  • Date.js parseExact() 当作为数组传入时不解析 4 位数年份

    我是否在 date js 中遗漏了 Date parseExact 的某些内容 根据api文档 我应该能够做到这一点 Date parseExact 10 15 2004 M d yyyy MMMM d yyyy The Date of 1
  • 如何链接 TextView 中的文本以打开网址

    我花了一个多小时查看了大量示例 但没有一个实际上适用于在 TextView 中设置文本以链接到 Web URL 示例代码 text8 TextView findViewById R id textView4 text8 setMovemen
  • 在包含字符串列表的系列上使用 Pandas 字符串方法“包含”

    给定一个简单的 Pandas 系列 其中包含一些可由多个句子组成的字符串 In import pandas as pd s pd Series This is a long text It has multiple sentences Do
  • 将 JSON 对象传递给 MVC 控制器时 string.empty 转换为 null

    我正在将一个对象从客户端传递到服务器 在此过程中 表示为 string empty 的对象属性将转换为 null 我想知道当对象类型支持 string empty 时如何防止这种情况 console log DataToPost dataT
  • 常见爬行-获取WARC文件

    我想使用常见的爬网检索网页 但我迷路了 我想要获取 www example com 的 warc 文件 我看到这个链接 生成以下 json urlkey com example 时间戳 20170820000102 mime text ht
  • 在 Safari iPhone 上的新选项卡中打开链接

    我有一个网站可以帮助人们为 Instagram 帖子创建标题并评估主题标签 其中一项功能非常简单 只需将主题标签链接到 Instagram 即可查看它们包含哪些类型的图像 因为我不希望他们刚刚输入和评估的输入消失 所以我使用 target
  • iOS 获取数组中选定联系人的电子邮件地址

    我想做的就是向用户展示人员选择器 让他选择他想要的所有联系人 最后将所有这些联系人的电子邮件地址放入数组中 最好的办法是只向用户显示带有电子邮件的联系人 到目前为止 我唯一能做的就是向人员选择器提供以下代码 ABPeoplePickerNa
  • 使用 css3 淡入淡出背景图像

    嘿大家 我想知道为什么这行不通 right article boy background transparent url images boxes bg boy jpg left top no repeat width 413px heig
  • 从 .net 向操纵杆发送反馈/效果

    感谢这个答案https stackoverflow com a 13734766 637142 https stackoverflow com a 13734766 637142我能够知道何时按下按钮或何时旋转方向盘 现在我的问题是如何将效
  • 如何解决 mingw32-make.exe 退出并出现代码 2 错误?

    我已经安装了Qt Open source 4 8 3适用于 Windows 的库Windows 8 Pro x64 Qt Creator 2 6 0 and MingW 4 4 0手动 我从 Qt Creator 设置了套件和编译器 我打开
  • 如何使 jQuery `bind` 或 `on` 事件处理程序具有幂等性

    有什么办法可以打电话吗 selector bind click handler or selector on click handler 多次以便处理程序仅附加一次 现在 我有多个具有不同成功回调的 AJAX 处理程序 每个处理程序都会在页
  • ng-class 和 ng-style 有什么区别?

    ng class and ng style两者似乎都是动态设置 CSS 类的方法 它们之间有什么区别 ng style https docs angularjs org api ng directive ngStyle用于将 javascr
  • svn复制命令

    我知道这是一个非常菜鸟的问题 但是当我尝试使用以下命令从现有分支 而不是主干 创建新分支时 svn copy svn ssh svn example com software branches branch name svn ssh svn
  • 将空字符串作为参数传递给 boost::program_options 的最佳方法是什么?

    我有一个程序使用升压 程序选项解析命令行 其中一个参数是 AMQP 交换的名称 并提供默认值 出于测试目的 我想用空字符串覆盖此 AMQP 交换名称 以使用默认交换 我不知道如何将空字符串传递给升压 程序选项 那可能吗 不修改源码 如果没有
  • VS Task Runner Explorer - Node Sass 找不到绑定

    打开 Visual Studio 任务运行程序资源管理器时 gulpfile js加载失败 并且在 输出 窗口中发出此错误 Failed to run C DATA Git MyApp MyBiz MyApp MyBiz MyApp Web