node.js - 引用错误 : internalBinding is not defined

标签 node.js asp.net-core npm gulp aspnetboilerplate

在 ASP.NET Zero 5.x 中,npm run create-bundles 失败。

我正在基于 ASP.NET 样板框架在 ASP.NET Zero 的 ASP.NET Core MVC + jQuery 基础解决方案上构建一个许可项目。这不是一个新的/mint 项目,而是一个在过去成功构建和运行的现有项目。

我已经关注了 Getting started guide确保我安装以下内容:

  • nodejs (v10.15.3) + npm (v6.4.1)
  • gulp - 确保我在全局安装它(cli 版本 2.0.1 本地版本 3.9.1)
  • yarn (v1.13.0)
  • bundler 和压缩器 Visual Studio 扩展(最新)

然后我按照指南运行 yarn(两次 - 第一次收到错误消息)。

尝试运行 npm run create-bundles 时出现以下错误消息:

似乎我的缩小 JavaScript 文件都没有生成

我该怎么做才能使 npm run create-bundles 成功运行?

最佳答案

  • nodejs (v10.15.3) ...
  • gulp ... 3.9.1

这是 Node.js 10.14.2+ 上的 gulp.js 3.9.1 的问题。 1

这些是您的选择,按推荐顺序排列:

  1. 升级 gulp:npm install gulp@^4 1 — 对于 ASP.NET Zero,升级到 ASP.NET Zero 6.3.1+。
  2. 安装特定版本的natives:npm install natives@1.1.6 2
  3. 降级为Node.js 10.14.1 3

引用资料

  1. https://github.com/nodejs/node/issues/24985#issuecomment-447241752
  2. https://github.com/gulpjs/gulp/issues/2246#issuecomment-435646661
  3. https://github.com/nodejs/node/issues/24985#issuecomment-449124867

关于node.js - 引用错误 : internalBinding is not defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55078081/

相关文章:

javascript - 在 jquery.load 中调用外部网站 url

node.js - 为什么 Heroku 无法检测到 Node.js buildpack?

c# - 多部分/表单数据请求——上传 pdf 导致生成空白文件

node.js - npm 认为 Node 已经过时了,但事实并非如此

node.js - 尝试在 Windows 上使用 npm 安装 yo

node.js - docker ,NodeJs,Vuejs : can't access with localhost

performance - Couchdb 1.5 和 Node JS 查询服务器

asp.net-core - asp-controller 和 asp-action 属性不起作用

c# - 设置 .NET Core 项目的版本号 - CSPROJ - 而不是 JSON 项目

linux - 如何在 Linux (CentOs) 上部署 Angular 2 Quick Start 项目