node.js is not installed android studio gradle - node.js

guys,
I found the answer
node-js-is-not-installed
and I have the same problem
actually, I have nodejs
sudo apt-get install nodejs
Reading state information... Done
nodejs is already the newest version (8.10.0~dfsg-2ubuntu0.4)
.
but if I try to build I coach Gradle exception like
Node.js is not installed. Visit https://nodejs.org/en/download/ to install it.
Open File
unfortunately, steps by issues/3745 don't resolve it fo me
enter image description here
any help would be appreciated.

I had a identical problem earlier today. But I'm on a Mac. Same behaviour as you experienced.
I've try to reinstall node, and several rebuilding of my project but none of those worked.
In the end, I started over. Seems that the installation of the amplify cli did not went throught the previous time.
npm install -g #aws-amplify/cli
But I've come to another problem with the manifest.xml right after that. I think both are related...
And adding this to my manifest did the job : 'tools:replace="android:name"' (for reference if this problem follow : https://github.com/aws-amplify/amplify-android/issues/532 )

Run this in your project directory and then resync:
npx amplify-app --platform android
At least, this helped me

Did you install amplify using sudo? That has solved my problem.
Also using Mac OSX

Looks like you may not have proper write permissions on node_modules folder, use chmod 777 your_node_module_folder

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

LESS instalation - node file does not exist on Linux

I'm trying to install LESS css in Netbeans, but I'm running into one problem after another. As such, I already have LESS installed, but I can't get it running.
Less is installed via the npm package, I installed it using the packaging system, less itself via Terminal. The first problem I had was that despite a successful installation, Netbeans didn't get to the files he needed (usr/local/), I could either change permissions there, which I don't want to dig into, or change the location. So I changed the location of the .npm and .npm-global folders to my root (home/ivet/), from where Netbeans managed to load it.
So I set everything there, the general settings and the specific project and it looked fine.
I want it to be converted to css automatically after saving, but it throws the message "/usr/bin/env:"node": Directory or file does not exist" and the target css file is still empty.
I found a few advices, basically the same: "ln -s /usr/bin/node/ usr/local/bin/nodejs", but it tells me that the link already exists and nothing will solve it. On closer inspection, I found that the link does exist, but the target file does not exist.
I've also found that installing Nodejs legacy solves this, but this is an older piece of advice, the package no longer exists, and terminal pretends to have the packages that replace this installed. Even when searching for via grep, I couldn't find the file it should link to (neither node nor nodejs).
There are the same tips everywhere that don't work for me and I don't know what to try next. I use Linux Mint 20, but I call myself a Linux BFU, so please write answer step by step :-D
Thanks for the advice
Try completely removing NodeJS & npm and try to install NodeJS using nvm i.e., node version manager.
You can follow this link on how to install nodejs and npm using nvm.
It's always a tedious task sometimes when it comes to package managment with npm, so it's better to go with nvm and I strongly suggest to always have a fallback option for node version when using with or without nvm i.e.,
NodeJS LTS version & NodeJS latest/stable version.
There's also an alternative solution i.e.,you can try switching to yarn package manager.
I've had this issue on Ubuntu and I've resolved it likes this:
First of all I've removed node and npm packages via
sudo aptitude remove node npm
Then I've added the official repositories
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
After which I've just updated the list of packages with sudo aptitude update and then installed Node
sudo aptitude install nodejs npm
And that was it. With these steps done, everything just started to work.

Problems after installing nodejs

I was trying to install nodejs using homebrew. After the installation process finished with error my os seems to be broken. I can not run any commands. not even the basic commans lik cd and ls. I am getting following error.
I reverted changes in bashrc file. Has someone faced similar problem ? what could be the issue here ?
Turns out homebrew broke something in my case. As soon as I unistalled homebrew things were back to normal.
I used this link to unistall.
How to uninstall homebrew?

Installing and Using Node JS in My Project

Im very very new in NodeJS
I want to ask about installing and using it in my Project..
I've installed nodejs in my Windows, but I have no idea how to make it works in my Cordova/Phonegap Project. I want to install this module in my project node-gcm. it said I just have to execute npm install node-gcm --save but I dont know where should I execute that command so I tried executed it on my project root (/www). After that I tried the example application code to use it but It said that require is not defined. Can anyone tell me how to fix this?
You need to learn nodejs properly to use in your project. I would recommend the below site could be a good starting point for you which covers all the basics.
http://www.tutorialspoint.com/nodejs/
You are getting that error because, when you look at the package.json file of the node-gcm package, you will notice the dependencies mentioned as,
If you are a windows user, you need to get into your node_modules directory by giving cd node_modules command in your command line and then just issue this command npm install which will install all the required packages.
Hope this helps!.

How to completely uninstall Cordova

since I updated my mac to Sierra I noticed a strange behaviour in my cordova app: some plugins aren't working anymore, it just seems they are not copied in the ios platform even if when I add the Platform the plugins' folders are copied as usual. It just seems xcode ignore them.
I tried a few things: removing and adding again plugins, updating cordova, uninstalling and reinstalling cordova, updating platforms, trying creating a brand new app... nothing seems to fix the problem.
Searching around I found this command:
$ cordova platform update ios --save
and it worked without doing anything else.
Unfortunately I have to use this command everytime I make a change in the app and I remove and add the platform again so I guess it's a problem in my environment.
I would like to completely uninstall cordova, node.js and git and reinstall everything again. I found a few instructions like in this question for node.js How do I uninstall nodejs installed from pkg (Mac OS X)? but I don't know how to run correctly all of the commands, some of them fail.
Uninstalling cordova and reinstalling works but doesn't solve the problem.
I did it with
$ sudo npm install -g cordova
$ sudo npm uninstall -g cordova
Can someone link me where to find clear instructions step by step? I'm not that good with command line and I really want to fix this problem without formatting the whole system.
Thank you for any help!
Think I have the solution: I removed cordova,
sudo npm uninstall -g cordova
deleted the .cordova folder in my user home folder (it's a hidden folder!) and installed cordova again with
sudo npm install -g cordova
I noticed that one of my old cordova projects was working: remove platform, add platform and by default I had ios platform version 4.3.0. GOOD!
In another cordova project created after latest update it was still using ios platform 4.2.1.
In the root project folder there is the config.xml file and in this file I found this line in just the second project:
<engine name="ios" spec="~4.2.1" />
Just removed and now cordova is using by default the latest version of the ios platform.
I don't know exactly why in one project there was this line and why not in the other one... neither know if I updated the platform in one project before reinstalling cordova and after reinstalling in onther... can't remember.
I just know that now if I create a new project it's correctly using ios platform 4.3.0 and I tried to describe all my steps...
I hope it will be useful for anyone else because I was ready to format my mac to fix this :(
I don't think you really have a problem with node or npm.
It seems to me more the kind of problem that happen when you change your node version without rebuilding node_modules directory.
If you always install modules with --save modifier, try this:
rm -rf node_modules
npm install
...if not, you can make a backup of your node_modules first. But it will be useful only to inspect it to figure out what modules are missing in your 'package.json' file.

Resources