当前环境的节点Sass无绑定 [英] Node Sass No Binding for Your current environment
问题描述
我已经在SO上看到了很多这样的问题,但是似乎没有一个可以解决或匹配该问题.
Node Sass找不到您当前环境的绑定:具有Node.js 6.x的Windows 64位. 奇怪的是,我没有安装Node.js 6.x.在命令行中,节点-v给我v5.10.1.
I've seen quite a few of these questions on SO, but none seem to solve or match the problem.
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x. The odd thing is, I don't have Node.js 6.x installed. From the command line, node -v gives me v5.10.1.
我是现成的Angular4 Universal Asp.net核心Visual Studio 2017模板.
I'm the Angular4 Universal Asp.net core visual studio 2017 template straight out of the box.
我尝试过
- npm重建node-sass --force
-
Visual Studio中的Web外部工具中的重新排序节点
- npm rebuild node-sass --force
Reordering node in Web External toolsin Visual Studio
失败:Microsoft.AspNetCore.Server.Kestrel [13] 连接ID"0HL4JSD9SSV8E":应用程序引发了未处理的异常. System.Exception:调用节点模块失败,并显示以下错误:由于错误而导致渲染失败:错误:模块构建失败:错误:缺少绑定D:\ Projects \ angular2 \ node_modules \ node-sass \ vendor \ win32-x64-48 \ binding .节点 Node Sass找不到适合您当前环境的绑定:具有Node.js 6.x的Windows 64位
fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HL4JSD9SSV8E": An unhandled exception was thrown by the application. System.Exception: Call to Node module failed with error: Prerendering failed because of error: Error: Module build failed: Error: Missing binding D:\Projects\angular2\node_modules\node-sass\vendor\win32-x64-48\binding.node Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x
找到以下环境的绑定:
- 带有Node.js 5.x的Windows 64位
这通常是因为自运行npm install
以来您的环境已更改.
运行npm rebuild node-sass --force
为当前环境构建绑定.
在module.exports(D:\ Projects \ angular2 \ node_modules \ node-sass \ lib \ binding.js:15:13)
在对象. (D:\ Projects \ angular2 \ node_modules \ node-sass \ lib \ index.js:14:35)
This usually happens because your environment has changed since running npm install
.
Run npm rebuild node-sass --force
to build the binding for your current environment.
at module.exports (D:\Projects\angular2\node_modules\node-sass\lib\binding.js:15:13)
at Object. (D:\Projects\angular2\node_modules\node-sass\lib\index.js:14:35)
我哪里出错了?
推荐答案
在 Visual Studio 2017(15.4.1)上,您应该转到:
- 工具>配置外部工具>项目和解决方案> Web软件包管理>外部Web工具
然后按如下所示重新排列工具的顺序.
Then reorder the tools as seen below.
这对我有用.
这篇关于当前环境的节点Sass无绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!