Version of node for Sidekick - nativescript

I've just downloaded the latest Nativescript Sidekick. When I try to run it, I get the message that it is expecting:
"NodeJS >=8.0.0 <=10.5.0"
I'm using nvm, so I can switch node versions at will, but Sidekick appears to ignore this and pick up the latest (10.9.0 in my case). How does Sidekick detect the nodejs version? And how can I persuade otherwise???

After #GGarabedian confirmed that it worked with NVM for him, I played around a bit and discovered that Sidekick is looking for the NVM alias Stable.
So, by setting the alias to v8.11.0, Sidekick did work for me.
nvm alias stable v8.11.0

I have tested NativeScript Sidekick with the Node Version Manager and it appears to detect the currently selected Node version correctly. Can you verify if you have installed and selected a NodeJS version between 8.0.0 and 10.5.0 by running the node --version command in the Command Prompt?
Also, my tests were conducted on a Windows machine and it would be good to know if you are running on the same or different OS.

Related

Flutter_CLI: Because every version of flutterfire_cli depends on xml >=5.3.0 which requires SDK version >=2.14.0 <3.0.0, flutterfire_cli is forbidden

I am trying to install firebase_cli for my flutter project, but it tells me:
"Because every version of flutterfire_cli depends on xml >=5.3.0 which
requires SDK version >=2.14.0 <3.0.0, flutterfire_cli is forbidden"
Showing that my SDK version is 2.13.4 and it needs 2.14.0 onwards.
I went to flutter console as administrator and run choco upgrade dart-sdk. It told me I now have version v2.17.3.
However, I still get the same problem in flutterfire_cli.
Things I've tried:
creating a .bashrc file with the line export PATH="$PATH": "C:\Users\sjrol\OneDrive\Documentos\flutter\.pub-cache\bin" in it (it is the route flutter console told me to save).
creating a system environment variable inside PATH that points to my dart folder , with the newer version.
In my pubspec.yaml file I've got .
Then rebooted the PC. Same problem. No idea of what's happening.
Dart pub global and choco upgrade results (running the firebase console as administrator):
Flutter doctor (I don't use android studio so no problem, and the android status problem is something I've been facing for a long time and has never given me any problem. Maybe it still has something to do with this?).
I can tell I'm working with the new dart version in my VSCode now, thanks to the new features it has, but firebase still won't let me install CLI. Thank you in advance for your help.
Try this:
Change your sdk version in pubspec.yaml to sdk: ">=2.17.3 <3.0.0"
Run dart --version to make sure the new path is working
Run flutter clean
Run the app

How to install an older version of gomobile

after an OS re-install (MacOS Big Sur) I'm trying to get my go & gomobile development environment set up again. I have a specific version requirement for my app so I am using go 1.13.x, installed via homebrew.
I then installed gomobile via the command: go get golang.org/x/mobile/cmd/gomobile
The problem occurs when I run the following command: gomobile init, this throws the following error:
gomobile: Go 1.16 or newer is required
Before the OS rebuild I had the same go version (1.13.x) installed and gomobile worked, it never threw that error. After googling a bit my question is, is there a repository or place where I can download the gomobile binary for an earlier version? The website seems to only show a single "v0" version, which is the one causing the problem. Perhaps even if there's a way to build an older version from source?
Thanks in advance for any pointers!
Per the Go release policy, Go 1.13 hasn't been supported by the Go project for quite some time — for example, it hasn't received any security fixes since August 2020.
Instead of downgrading gomobile, upgrade to a supported version of the Go toolchain — see https://golang.org/doc/install for instructions.

Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)

After updating flutter version from 1 to 2, got unresolveable errors, so deleted all flutter sdk and redownload it using this command
git clone https://github.com/flutter/flutter.git -b stable
After this i entered command flutter precache which started downloading Dart Sdk, after that it get crash always...
no matter which command i run flutter doctor or any other, it always starts with Building flutter tool... and then crash.
Also tried other related questions and their answers but no luck...
flutter precache command exceution Image
Flutter and Dart Installed Directory Image
Crash proper image
If you are facing this on the Mac OS BigSur, please install rosetta first.
To do so you can use the following command:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
It worked for me :).
Several packages are not yet fully updated for Flutter 2.0. So I recommend that you continue using Flutter 1.x until everything is resolved. The easiest way is to normally install Flutte 2.0 as if you were going to use it and then downgrade.
To download it, follow this tutorial here:
How to downgrade Flutter SDK (Dart 1.x)
When the flutter pub get fails to return the dependencies it gets stuck trying several times. And if you get a pub get via the interface you won't see any errors happening, so I recommend making flutter pub get.
Ok so i have filed this issue on flutter github.
You can checkout the link https://github.com/flutter/flutter/issues/78167
the answer they told me is: something in the certificate validation is broken on older Mac OS X versions.
Until they resolve issue for older versions of Mac OS. There are two possible solutions:
First is absolutely to upgrade Mac Version but if you have low Ram or Disk switch to solution no.2
Second solution is to downgrade flutter version.
Also like to point out that if you have installed flutter version 2, it won't downgrade to version 1 using command "Flutter Downgrade", atleast this was not working for me so i downloaded older version manually using this link: https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
Try delete your flutter sdk folder and checkout it's again.
git clone https://github.com/flutter/flutter.git -b stable

Xcode and flutter compiler error: reading from wrong directory

I am getting this error and my app will not compile. The problem is that I had to upgrade macos to be able to compile apps on newer iOS versions, and in doing so I copied my project over from my mojave machine to my catalina one. The directory users/mojave no longer exists, and it needs to be replaced with users/catalina
I have searched the app for any reference of mojave anywhere, and replaced it all with catalina. I have rebooted macos, and it still fails, looking for this old directory.
How do I find and change these references? I am not able to find anything online, possibly because I don't really know how to phrase this question.
So this is another one of those occasions where the error doesn't really indicate what is wrong here.
The problem was that "pods setup" had not been run, so it had not initialised.
The reason for this is that when I ran "pod setup" it does literally nothing.
Researching this issue online, it seems an issue since cocoapods 1.8.0, and the dev team said that they had hotfixed this issue and it would be available from version 1.8.1
Well, this was version 1.8.4 and it is still broken with exactly the same issue.
The fix was to uninstall it completely:
sudo gem uninstall cocoapods
And then install version 1.7.5:
sudo gemo install cocoapods --version 1.7.5
From here, with the older version installed that actually works, "pod setup" runs fine, pods is initialised and the app no longer looks in the incorrect folders.
Hope this helps someone.

Not seeing latest version when updating Node.js via installer (MSI) Windows 7

I'm trying to update node on my Windows 7 box but I'm not seeing the latest version after I re-install/update node.
I'm just going out to http://nodejs.org/download/ and getting the latest Windows installer, v0.10.28. I then just run that installer where it defaults to installing everything on my local hard drive, including npm, which is cool because I wanted to upgrade that as well.
Install runs/finishes with no apparent problem, but when I do a:
node --version
I'm still seeing my "old" version, v0.10.15, not the latest I supposedly just installed, v0.10.28. My npm version still reports my "old" version as well.
I've tried rebooting as well.
How the heck does one update node/npm?
I had a similar problem but on MacOS and the reason was I had nvm installed. So running the commands found on most websites:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
didn't work, node -v still displayed the old version.
What I did was to install node from nvm:
nvm install v0.12.6
This will build node from scratch on your machine, and then node -v will display the correct version. I think I could have still used the previous commands by using n and then do nvm use v0.12.6, but this is something to test. If you have nvm installed, just check the commands for nvm to upgrade node.
Answer given by Johan Dettmar about using n will work here as well.
For Windows : open command prompt as administrator
For Linux/Mac : sudo -s on terminal
npm cache clean -f (force) clear you npm cache
npm install -g n install "n" (this might take a while)
n stable upgrade to lastest version
Windows Users
Node is most likely installed in 2 locations.
C:\Program Files\nodejs
C:\Program Files (x86)\nodejs
Rename the folder of the (x86) version to "nodejsOLD", restart command prompt, and try again.
node -v
The installer works just fine, things you do NOT need to do:
You do NOT need to uninstall
You do NOT need to reboot
There is a good discussion for Windows and node on stack overflow here:
How do I update npm on Windows?
I had this exact same problem, and one thing to be careful about is to make sure you are downloading the correct architecture version (e.g. 32-bit or 64-bit). When upgrading, I had downloaded the 32-bit version and didn't realize it. But the previous version I had installed was 64-bit. So I actually ended up with a 32-bit and 64-bit version installed. But when you go to do an uninstall, it only lists one version of node.js, so even after I uninstalled, it uninstalled the latest version, but kept the earlier version on there. That's why I kept getting the old version when I did "node -v".
Once I downloaded the correct version (64 bit in my case), the problem was resolved.
A tip that might be useful for others, I found it helpful to known for Windows platforms.
Enter the command in cmd.exe:
where node
This outputted for me that node.exe was in a subdir of Chocolatey.
Problem was that this version was v8.11.1 and it did not work with newer version of the Angular-CLI. So I removed the exe and then ran the installer of the LTS version of Node on Nodejs website to get a working version of Node for Angular. Tested out on Windows 10.
So if you are on Windows, test out the where command in cmd.exe
Linuxers and Mac-ers can use other commands, such as which command.
Screen shot below. I deleted the node.exe file before running the node.exe command.
To fix this problem you can modify your "Environment Variables".
From "System Properties" open the "Environment Variables".
In the system variables section select the path variable and click on the edit button.
In this list you must have the latest folder of installed Node.js(delete other Node.js folders from the list).
That's it
To update Node, download the latest http://nodejs.org/dist/latest/node.exe (or http://nodejs.org/dist/latest/x64/node.exe for 64bit systems) and replace your old node.exe with it.
To update npm, run the npm update npm -g command.
Even though it might sound stupid, make sure you did not previously have node version managers installed which you no longer use, such as Nodist. These will allow the machine to only have their internal node version as the usable version and not the one you install yourself manually.
Uninstalling these package managers, if you want to manually update your Node/NPM versions, will solve the issue.
I had the same problem - but it was caused due too duplicated versions of nodejs being set in my environmental variables.
You can easily check that in Windows using where node in cmd. If more than one path is being output that might be the reason for this error. You can fix it by removing the other environmental variables.
I had the same problem in Windows 10 and none of the above recommendations worked. Then I closed the terminal window, restarted it and the correct version now showed, and the subsequent version errors running other commands also went away. Seems that the version loaded by Windows PowerShell is stuck until the terminal is relaunched. Clearing the cache via command line was futile.
Seems simple and dumb, but that resolved it for me (in the sense that it probably was resolved in the background but I couldn't see the resolution take effect until the terminal was reloaded). Hope this helps someone else.
Using where node, worked for me. That showed me that I had node in the heroku directory as well and since I won't be using that CLI anytime soon, I just removed that dir from the 'path' 'system variable'.
You can fix this on Windows by following these steps if you have already installed nodejs latest version but that is not showing/working.
Open Cmd type where node it will give you a path (like in the
attachment)
Go to that location and delete the node application
exe file
and then come back and try to check that's all you are done , that was the issue of path, your system was using the old reference

Resources