Search code examples
node.jsasp.net-corenpmgulpaspnetboilerplate

ReferenceError: internalBinding is not defined


In ASP.NET Zero 5.x, npm run create-bundles fails.

I am building a licensed project on the ASP.NET Zero's ASP.NET Core MVC + jQuery base solution, based on ASP.NET Boilerplate framework. This is not a new/mint project, but an existing project that has been built and ran successfully in the past.

I have followed the Getting started guide to ensure that I install the following:

  • nodejs (v10.15.3) + npm (v6.4.1)
  • gulp - ensured I installed it globally (cli version 2.0.1 local version 3.9.1)
  • yarn (v1.13.0)
  • bundler & minifier Visual Studio extension (latest)

I then ran yarn (twice - the first time around I received an error message), as per the guide.

Trying to run npm run create-bundles gives me the following error message:

It seems that none of my minified JavaScript files are generate

What can I do for npm run create-bundles to run successfully?


Solution

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

    It is an issue with gulp.js 3.9.1 on Node.js 10.14.2+. 1

    These are your options, in order of recommendation:

    1. Upgrade gulp: npm install gulp@^4 1 — for ASP.NET Zero, upgrade to ASP.NET Zero 6.3.1+.
    2. Install a specific version of natives: npm install [email protected] 2
    3. Downgrade to Node.js 10.14.1 3

    References

    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