Node with Mac m1 - node.js

I am having problems with node and my macOS with arm processor. I have already followed the whole discussion on this other post.
I tried to do a clean install of node for arm with rosetta2, but if I run node -p "process.arch" I always get x64.
Since I have already removed and reinstalled node 5 times just today, could you please help me to find out how can I solve this problem? Thank you!

SOLVED! I:
Removed all Node files, everything, in all folders and subfolder making sure that node was completely uninstalled
Removed the libraries and removed the dependencies
Re-installed Node with brew (using arch)
Re-installed libraries and dependencies
Last but not least, a fresh restart of the Mac since yarn was not working anymore (with segmentation fault).

Related

Node & M1 Mac: dyld[]: missing symbol called

i really need your help.
I am having problems with node (v16.8.0) and my macOS with arm processor. Every time i want to run the backend of this project i get this:
dyld[17378]: missing symbol called
I have already followed the whole discussion on this other post.
I tried to do a clean install of node for arm with rosetta2, but if I run node -p "process.arch" I always get x64.
I've also tried with a more aggressive approach:
Removed all Node files, everything, in all folders and subfolder making sure that node was completely uninstalled
Removed the libraries and removed the dependencies
Re-installed Node with brew (using arch)
Re-installed libraries and dependencies
Since I have already removed and reinstalled node 5 times just today, could you please help me to find out how can I solve this problem? Thank you!
Once again, found the solution.
The solution was:
Clean up again everything. This means uninstall and delete all files for: yarn, npm, nvm, and node
Re-install everything via homebrew
Delete all node_modules
Re-run yarn/npm install in the repo

Cannot find Typescript using NVM

I have nvm installed and recently fixed an issue with a conflict with a previously installed version of node. Fixing it meant removing the node executable from the prior location. Some things still work but I'm getting this error:
Cannot find module 'typescript'
and this fix didn't help me:
How to fix Cannot find module 'typescript' in Angular 4?
running ng new is what is triggering the error.
I have typescript installed globally. And to ensure that is installed with this version of node, I ran:
nvm use 10 && npm i -g typescript
/Users/username/.nvm/versions/node/v10.16.0/lib/node_modules/typescript/bin/tsserver
Thanks,
Wayne
When using nvm, every node version has it's own globally installed dependencies. If you are not finding something you have installed previously for a different version of node (or you have removed it), this can be a reason.
For anyone coming across this question, I found the answer here.
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
I had to do all of the steps in the most accepted answer. I also had to:
rm -Rf /user/local/bin/node_modules
It might be a good idea to search your machine for all node_modules folders and, of course, ignore any "local" versions. And delete all of them that are not in your nvm directory. That directory will look somehting like:
/Users/username/.nvm/versions/node/v#####/lib/node_modules
You can identify yours using:
npm root -g

cannot uninstall node and npm completely on high sierra

I recently installed Node on my MacBook running High Sierra 10.13 using the .pkg file supplied on their website.
After a few hours of experimenting with installing other packages and writing scripts, I decided I would like to uninstall both Node and NPM to get a fresh start.
I tried all of the top answers from this thread, but to my dismay, after having followed all instructions, and repeated all steps many times, terminal would still recognise the Node and NPM versions.
I ended up running a bash script through terminal which I found on the same thread, which ended up doing nothing but downgrading my current version of Node to 0.10.8 - making it a lot more difficult to delete in the long run.
I've re-done all of the steps from the aforementioned thread with no avail, and terminal still stating that it has version 0.10.8 (and NPM just completely not working at all)
Currently at my last stance of what to do, so hopefully someone on here can help me with my problem.
Cheers.
After searching through Google and StackOverflow for hours, I finally came up with a solution to the problem on my own.
Running the type command within terminal against node, I got this returned:
:~ myusername$ type node
node is /Users/myusername/.nvm/v0.10.48/bin/node
Subsequently, after deleting that folder, Node appears to be completely removed from my system.
I have since made sure that I have deleted all node and node_module folders that I could find within /usr/ to make sure - and I would suggest that anyone attempting this also do the same.
Try to run the following command
brew uninstall node
After the above command, you need to scan manually for node_modules if exists. Try following.
grep -irl "node_modules/node"
sudo rm -rf result_from_above_command
rm -rf ~/.npm
I hope this will remove all the node and it's components. As I have done like this, once before.
Thank you.

Can't update from Node v0.10.46 on Mac

I'm having problem's when trying to run my gulp command in the terminal. I've been trying to track down the issue and from what I can tell the issue is that I'm running an outdated version of node.
node -v tells me that I am on v0.10.46, but the Node install downloaded from the website says it's currently on v4.4.7.
The first issue I had was with es6 promises, but I managed to install the es6-polyfill which solved the issue.
Now gulp is throwing an error related to /node_modules/gulp-imagemin/index.js. Specifically the use of const variables. (const path = require('path')).
Based on this thread: https://github.com/sindresorhus/gulp-imagemin/issues/181#issuecomment-219303510 - this issue seems to be an outdated version of node, but no matter what I do it won't upgrade!
I've explored all possible avenues for upgrading Node - using npm, nvm, n, brew and even a local re-install, but everytime it seems to be installing an outdated version.
I've explored the possibility that I'm installing a 32bit version on a 64bit system, but that doesn't seem to be the issue either.
I have absolutely no idea how to progress fixing this issue. I'm trying to build a wordpress website, and no matter what theme I use this error comes back to haunt me!
Help!
EDIT:
Just to add.. in this image (http://imgur.com/a/OzR5Y) you can see the output of me trying to upgrade using N, and then following the David Walsh upgrading method.
I had the same problem and I tried everything from uninstalling it by this instructions without any result. But maybe you have in your computer a management like nvm installed, just try this:
which node
And then if the respond of that is something like:
/Users/MYUSER/.nvm/v0.10.46/bin/node
That's the problem, so you can solve this by uninstalling nvm and then install Node.js normally or just keep using nvm

Ionic installation a file is always missing

I have installed node, cordova 6.1.1, python 2.7.
I've been trying to install ionic for the past 3 hours on windows, but I get error after error. A file is always missing. I've uninstalled it a couple of times, I even deleted the whole node_modules inside npm, but nothing will make it work. How can I solve this?
The first 4 times I used the latest version of node.js v6.2.0. To make it work I uninstalled it and used v4.4.4 LTS. If you're having the same problem, I hope this helps.

Resources