ReferenceError: internalBinding is not defined - node.js

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?

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:
Upgrade gulp: npm install gulp#^4 1 — for ASP.NET Zero, upgrade to ASP.NET Zero 6.3.1+.
Install a specific version of natives: npm install natives#1.1.6 2
Downgrade to Node.js 10.14.1 3
References
https://github.com/nodejs/node/issues/24985#issuecomment-447241752
https://github.com/gulpjs/gulp/issues/2246#issuecomment-435646661
https://github.com/nodejs/node/issues/24985#issuecomment-449124867

Just Update gulp version into 3.9.1 and this version support Node.js lastest version.
npm install gulp#3.9.1

Related

Why does my angular 8 project does not start after install angular 10 cli?

I was working on anagular 8 project on my computer. But now need to install angular 10 t run another project.
So I have installed new version as globally: npm install -g #angular/cli
And the new angular 10 project works now, but angular 8 project does not start. It throws an error while starting.
An unhandled exception occurred: Cannot find module
'#angular-devkit/build-angular/package.json' Require stack:
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\architect\node\node-modules-architect-host.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\architect\node\index.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\models\architect-command.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\commands\serve-impl.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\tools\export-ref.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\tools\index.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\utilities\json-schema.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\models\command-runner.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\lib\cli\index.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\lib\init.js
C:\Users\Mm\AppData\Roaming\npm\node_modules#angular\cli\bin\ng See "C:\Users\Mm\AppData\Local\Temp\ng-mhNKKl\angular-errors.log" for
further details.
My system versions are:
npm: '6.14.6'
Node.js v12.18.3
Angular CLI: 10.0.8
use this command in cmd
npm install --save-dev #angular-devkit/build-angular
Try this also
npm update
You should not upgrade angular directly to version 10, if you are behind several versions. In your case you are at version 8 but you are going to upgrade to version 10.
In such scenario you have to upgrade to version 9 before 10.
You can find official upgrading guide docs for the same here.

NG command is displaying incorrect node version

I am getting below error when I tried to use ng command
Node.js version v11.13.0 detected.
The Angular CLI requires a minimum Node.js version of either v10.13 or v12.0.
Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
When I try to see the node version using node -v, I see node version on my machine is v12.18.3
So from where ng is getting v11.13.0? How do I resolve this issue?
I tried below steps
Clear the NPM cache
Uninstall both node versions from the NVM
Uninstall anything that starts with node in Control Panel\Programs and Features
Install required node versions in NVM
Install Angular CLI
and things started working for me.
Had the same issue. It turns out installed Angular CLI was not compatible with the installed node and npm version. I used the https://stackoverflow.com/a/60258560 to check the compatibility. Then performed following steps:
Uninstall Angular cli
Uninstall Node and NVM
Installed Node version I wanted (10.x).
Installed specific Angular version corresponding to Node v10 which was Angular Cli v11 at this time.
I was also facing the same issue in my Windows machine where the node -v version and the version picked up by ng command were different. This was because my node.js command prompt was picking the version from AppData\Roaming\npm folder. Cleaning up this folder fixed the issue for me.
Uninstall node
Empty the contents from C:\Users<user>\AppData\Roaming\npm
Install the required node version

ReferenceError: primordials is not defined error when installing Semantic UI

I know that this question had been asked a lots of times (for instance - here), but either solutions didn't work or didn't fit my scenario.
The solution, offered in the link above, was:
Solution: Either upgrade to gulp 4 or downgrade to an earlier node.
So, here's what I have:
• Node: 12.18.1 (node -v)
• Gulp: CLI 2.3.0, Local version 4.0.2 (gulp -v)
I have created brand new react app:
npx create-react-app --template typescript react-app
Then I go to app folder (react-app) and execute the following command as on Semantic UI site:
npm install semantic-ui --save
However, I get the same error as in the question above. Here's the full output of this command:
If you don't want to roll back your version of Node, try using the actively maintained community fork of Semantic UI: Fomantic UI.
Run the command as you would with semantic-ui: npm i fomantic-ui
Fomantic is backwards-compatible with Semantic UI while resolving compatibility issues between Node 12 and Gulp 3 (which another thread references as being the root of the "primordials is not defined" issue).
Try going back to Node v10.
The thing is that Node v12 has a feature that is not compatible with Semantic-UI (Gulp 4.0.2), and that's why you get the error.
Please try upgrading your node.js to the latest version at https://nodejs.org/en/download/
and also run the following command npm install -g npm#7.0.9 or the latest version to update your npm.
After upgrading and updating Node and npm I installed semantic-ui without getting the primordial not defined error.

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

I get following error message when running gulp:
Error: Missing binding Z:\Themewagon\Premium\sparrow\zcore\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
Found bindings for the following Environments: Linux 64-bit with Node.js 7.x
To resolve this error I tried:
npm install node-sass,
npm rebuild node-sass,
npm uninstall -save node-sass,
npm install -save node-sass,
npm cache clean. etc
Nothing is working for me. How do I resolve this issue.
This happens when you have 2 versions of Node installed, add node-sass with one and run it for the other.
Example Visual Studio ships with Node 5 (at least VS2017 does). If you have installed another version of node (say v6) and install node-sass using that. When it installs it binds to the version to version 6. You can then never run gulp via Visual studio (under Node 5) it fails with the error.
To fix this you can make visual studio use the version you have installed on your system. Add the entry to top of the list to your node location:

Cordova + Visual Studio 2015 edge.node error

When I want to build my cordova app in vs2015 then I get the following error message:
Severity Code Description Project File Line Suppression State
Error The edge module has not been pre-compiled for node.js version
v6.9.1. You must build a custom version of edge.node. Please refer to
https://github.com/tjanczuk/edge for building
instructions. Katalog C:\Users\m.hüttl\Documents\Visual Studio
2015\Katalog - Kopie\Katalog\MDAVSCLI 1
This is what I already tried:
List item
update node.js
update all global packages
downgrade edge.js to version 4.0
Currently installed versions:
Node: 6.9.1
Cordova: 6.1.1
Edge: 5.0.0
Edge-cs: 0.2.7
try going to the folder C:\Users{user}\AppData\Roaming\npm\node_modules\vs-tac and changing the package.json to use edge version 4.0.0, deleting the edge folder in the node_modules, and running npm install in the vs-tac folder
You can also verify if the Joyent Node.js is properly installed. Try running VS setup checking the Joyent Node.js installation

Resources