Install node version 16 on M1 Apple mac - node.js

For new Apple M1 silicon mac-books, how can we install node on processor x86_64 arch.
According to node.js download page, they don't provide the mac installer for x86_64 processors. Please refer the download page - https://nodejs.org/en/download.
Note: Node Mac Installer only support ARM64 processor.
I have tried Rosetta terminal options, but not able to install node#16 with x86_64 arch on M1 mac machine. Please provide any suggestions to solve this problem.

You can do brew install node#16, but it requires some PATH environment variable hacks.
I'd recommend nvm or asdf plus nodejs plugin

Related

Failed to "nvm install 8.0.0"

My goal is to install node version 8 so I can run Gulp on a project.
I'm working on an old project that has been neglected and passed downed to me by another developer. I'm told I can work with Gulp by installing Node Version 8 and declaring the node version in my package.json file.
But whenever I try to run nvm install 8I receive the error error: "unsupported ARM architecture"
My system is MacOS Big Sur M1 Chip
I am not too sure what I'm supposed to do here. Please help!
Solution
The solution was to change the architecture of my shell from arm64 to x86.
Macs with M1 chip
January 2021: there are no pre-compiled NodeJS binaries for versions prior to 15.x for Apple's new M1 chip (arm64 architecture).
Some issues you may encounter:
using nvm to install, say, v14.15.4:
the C code compiles successfully
but crashes with an out of memory error when used
increasing the memory available to node still produces the out of memory errors: $ NODE_OPTIONS="--max-old-space-size=4096" ./node_modules/.bin/your_node_package
when using nvm to install some versions, the compilation fails
One solution to this issue is to change the architecture of your shell from arm64 to x86.
Let's assume that:
you already have versions 12.20.1 and 14.15.4 installed using nvm
the current version in use is 14.15.4
you are using the zsh shell
you have Rosetta 2 installed (macOS prompts you to install Rosetta 2 the first time you open a Intel-only non-command-line application, or you may install Rosetta 2 from the command line with softwareupdate --install-rosetta)
//# Check what version you're running:
$ node --version
v14.15.4
//# Check architecture of the `node` binary:
$ node -p process.arch
arm64
//# This confirms that the arch is for the M1 chip, which is causing the problems.
//# So we need to uninstall it.
//# We can't uninstall the version we are currently using, so switch to another version:
$ nvm install v12.20.1
//# Now uninstall the version we want to replace:
$ nvm uninstall v14.15.4
//# Launch a new zsh process under the 64-bit X86 architecture:
$ arch -x86_64 zsh
//# Install node using nvm. This should download the precompiled x64 binary:
$ nvm install v14.15.4
//# Now check that the architecture is correct:
$ node -p process.arch
x64
//# It is now safe to return to the arm64 zsh process:
$ exit
//# We're back to a native shell:
$ arch
arm64
//# And the new version is now available to use:
$ nvm use v14.15.4
Now using node v14.15.4 (npm v6.14.10)
source: https://github.com/nvm-sh/nvm
Find UR iTerm (or any other termial ur using)
Double-click =>【get info】
In General Panel:
✅ Open using Rosetta (selected this item)
Back to termial and continue use nvm install 8

Which linux version supports node js on windows 7

I am a windows 7 user and want to download npm and nodejs.
I have tried to install node js on windows 7 but it is not supported.
So, is there any linux version that can be downloaded on windows 7 and supports npm and nodejs ?
Or if anyone can tell any other way to download npm and nodejs on my pc.
And, I cannot upgrade my operating system.
I think you are a bit confused, Linux cannot be installed on Windows (there's the subsystem on Windows 10, but that's different), as Linux is a kernel that is usually paired with the GNU operating system, in practice, this means Linux is used as an operating system, and cannot be installed on Windows.
Installing Linux on your computer would mean deleting Windows.
What you can do, if you can't uninstall Windows, is create a virtual machine running Debian (a popular Linux distribution) using VirtualBox, you'd need to get a Debian ISO and create a virtual machine with it.
Once you install it, you can run sudo apt install npm nodejs inside a terminal to install Node.js and npm.
You don't have to use Debian, I suggested it because I personally like it for servers, but you can use Ubuntu, Fedora, Manjaro or any other distribution.
EDIT:
I did some further reading and found this tutorial, in which is shown how to install Node.js on Windows 7, by installing the LTS release 13.14.0.

How to install node.js, nvm, npm on QNAP (NAS)

in QNAP APP center has node.js 4.x and 0.8.X version
However, these two versions are too old, I hope we can install a newer version.
I try to login linux system installed through the command
https://www.ostechnix.com/install-node-js-linux/
nas seems to have removed some of the command, I checked it is Ubuntu but no apt-get, I can not install node.js through these comman
cat /proc/version
Linux version 3.4.6 (root#BuildServer36) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Thu Oct 26 11:01:49 CST 2017
like this
sudo apt-get install nodejs npm
-sh: sudo: command not found
apt-get install nodejs npm
apt-get: command not found
I have not tried to install the mongodb should have a similar problem
My nas model is TS-439 Pro ii
Or just go to qnapclub.eu a repository of “unofficial apps” - download it and install through the GUI in app center...
You have to select accept third party apps and you should be good to go..
I was straggling with the same issue on mine QNAP.
I found this tutorial: https://techblog.dorogin.com/running-nodejs-app-on-qnap-nas-via-pm2-3bdb838524e4 written by Sergei Dorogin.
Highly recommend you to install pm2 which is production manager for node.js
https://github.com/Unitech/pm2
It took me around 3hours to set up everything, because I'm not good with Linux
I haven't played with this yet, but it seems like using Container Station to install an official Node.js Docker image is the way to go. This gives you a complete preconfigured Linux environment to run Node in.

How to install a 32-bit node.js(8.5.0) into a 64-bit ubuntu(17.0)?

I've downloaded 32-bit、64-bit node binaries of v8.5. Currently I also have a 64-bit ubuntu os(v17.0). I tried ./bin/node both on 64-bit binaries and 32-bit binaries, and 64-bit was working fine but 32-bit node binary returns bash: ./node: No such file or directory.
So how do I run 32-bit node on 64-bit a linux system?
You may ask why I'm doing this, because there are some very old .so library which is 32-bit, I can't get this library working with node-ffi with 64-bit node, so sadly I have to install a 32-bit node.
Also, I've tried nvm install 8.5.0 32, it downloads x64 sadly. And I just realize this only works in windows with this nvm-windows, which indicates there is a way to install a 32-bit node on a 64-bit OS?
Take a look atthis article
First you'll need to enable 32-bit support:
sudo dpkg --add-architecture i386
sudo apt -get update
The article I linked to then recommends apt-get dist-upgrade, but I'm not actually sure that will do much for you.
Then you'll need to install the libraries that the 32-bit version of node uses.
sudo apt-get install libc6:i386
will install the base set of libraries that all applications need in 32-bit mode.
sudo apt-get install libares2:i386 libicu57:i386 libstdc++6:i386 libgcc1:i386
should get you to a point where running ./node gives a useful error pointing to a specific library that you need to install so that Node can run.
I've tried: sudo apt install nodejs
And it worked.

I want to install Mono 5.0.0 on Debian 8

I'm quite new to Debian and now I wanted to install Mono 5.0.0 on Debian 8 in order to run some programs, which require Mono 5.0.0, but I don't have a clue how to install Mono. Currently I've got installed Mono 4.8.1, but what do I have to to, in order to update this?
Thanks for your help!
See the recent announcement here about Linux packages: http://www.mono-project.com/news/2017/04/24/mono-linux-package-repository-changes-beginning-with-5-0/

Resources