I keep getting 'You need to run "nvm install N/A" to install it before using it.' even tho I have already installed lts/* - nvm

nvm ls:
-> system
default -> system
unstable -> system
node -> stable (-> v12.16.3) (default)
stable -> 12.16 (-> v12.16.3) (default)
iojs -> N/A (default)
lts/* -> lts/erbium (-> v12.16.3)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.20.1
lts/erbium -> v12.16.3

use nvm alias default v12.16.3 to set default version explicitly

I resolved this updating the node to LTS version:
nvm install --lts

DISCLAIMER: We were getting this error specifically trying to run
a React Native build for iOS in Microsoft AppCenter. The OP question did
not specify the environment so depending on your setup your mileage may
vary.
In our specific circumstance, the issue was resolved by bumping the
XCode version from 10.1 to 11.3.

Related

NU1107: Version conflict detected for Microsoft.CodeAnalysis.Common

I'm having issues when I try to build the application that leads me to run a package restore, but that fails, and I can't update packages either.
NU1107 Version conflict detected for Microsoft.CodeAnalysis.CSharp.Workspaces.
Install/reference Microsoft.CodeAnalysis.CSharp.Workspaces 4.4.0 directly to project DACRL.Portal.Admin to resolve this issue.
DACRL.Portal.Admin -> Microsoft.VisualStudio.Web.CodeGeneration.Design 7.0.1 -> Microsoft.VisualStudio.Web.CodeGenerators.Mvc 7.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration 7.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 7.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration.Core 7.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration.Templating 7.0.1 -> Microsoft.VisualStudio.Web.CodeGeneration.Utils 7.0.1 -> Microsoft.CodeAnalysis.CSharp.Workspaces (>= 4.4.0)
DACRL.Portal.Admin -> Telerik.UI.for.AspNet.Core 2022.3.1109 -> Microsoft.CodeAnalysis 4.0.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces (= 4.0.0).
I have the latest SDK installed:
And the whole solution (each project) is set to .net 7.0:
<TargetFramework>net7.0</TargetFramework>
And the global.json is also setup correctly:
{
"sdk": {
"version": "7.0.101"
}
}
The last thing that it advises is to manually install Microsoft.CodeAnalysis.Common 4.4.0 directly to project DACRL.Portal.Admin, and that also fails.
NU1107: Version conflict detected for Microsoft.CodeAnalysis.Common.
Install/reference Microsoft.CodeAnalysis.Common 4.4.0 directly to project DACRL.Portal.Admin to resolve this issue.
DACRL.Portal.Admin -> Microsoft.CodeAnalysis.CSharp.Workspaces 4.4.0 -> Microsoft.CodeAnalysis.Common (= 4.4.0)
DACRL.Portal.Admin -> Microsoft.VisualStudio.Web.CodeGeneration.Design 7.0.0 -> Microsoft.DotNet.Scaffolding.Shared 7.0.0 -> Microsoft.CodeAnalysis.CSharp.Features 4.0.0 -> Microsoft.CodeAnalysis.Common (= 4.0.0).
It seems that Telerik.UI.for.AspNet.Core 2022.3.1109 added v4.0.0 of Microsoft.CodeAnalysis.* DLLs. I had to manually add the following NuGtes:
Microsoft.CodeAnalysis.Common
Microsoft.CodeAnalysis.Workspaces.Common
Microsoft.CodeAnalysis.CSharp
Microsoft.CodeAnalysis.CSharp.Workspaces
Microsoft.CodeAnalysis.VisualBasic
Microsoft.CodeAnalysis.VisualBasic.Workspaces
Now, solution compiles and NuGets get appropriately updated.

Npm updates sucessfully, but still shows old version

When I do a npm -v I see that I am still on 5.6.0. And keep getting prompts to do a npm i npm.
But I've done a sudo npm install npm#latest -g and double checked with a npm outdated -g --depth=0 to see that my global npm is at the latest already (6.0.0).
How do I resolve this conflict? Is the npm I'm using the latest or is it still the old one? Is it because my global is linked incorrectly or something?
Try closing the Terminal - once you open it again it should work, worked for me well.
*IvanD wrote this solution in a comment to the original post, I thought it's worth an answer post.
I can 100% vouch this works.
I got this from someone who teaches node.js.
Give NVM (Node Version Manager) a try. Do the commands in the following ordrer:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
command -v nvm
nvm install node
finally confirm that the update was successful
npm -v
Let's do a better solution if all of the mention methods not help you:
You need to install nvm (Node Version Manager)
After that just run:
nvm install 14
list your versions to see is version installed
nvm ls
and you will get list like this:
v10.2.0
v12.18.3
-> v14.10.0
system
default -> 14.10.0 (-> v14.10.0)
node -> stable (-> v14.10.0) (default)
stable -> 14.10 (-> v14.10.0) (default)
iojs -> N/A (default)
unstable -> N/A (default)
lts/* -> lts/erbium (-> v12.18.3)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.22.0 (-> N/A)
lts/erbium -> v12.18.3
Switch default version like this:
nvm alias default 14.10.0
And check:
node -v
If print v14.10.0 you are ready to rock, if not:
nvm use 14
and check again.
This need to work like a charm and you will be happy.
Check your /usr/local/lib folder. I had the same problem and a node_modules folder in here. After removing it and rerunning [sudo] npm install npm#latest -g it showed and used the correct version.
sudo npm install -g n
If you want latest stable version
sudo n stable
If you want the latest version
sudo n latest
Then restart computer
I had this issue today with Node installer node-v10.16.0-x64.msi. Even after installing it I got the node version from npm -v as 3.10... and my react app would fail to start :(
It seems that node creates a folder in APPDATA at %AppData%\Roaming\npm
There was an old npm.exe lying there and this was in my Windows Path at user level. The user level Path overrides the system level Path where the new installer had added its path. The user override caused the new npm to not be found. Solution: Shift-Delete %AppData%\Roaming\npm ! :D Remove and reinstall with node-v10.16.0-x64.msi
Now npm -v gives 6.9.0!
If you have tried all the mentioned approach like :-
sudo npm install -g n
sudo n stable
or
sudo npm install npm#latest -g
still npm -v showing you the older version, once try to close your terminal and open a new one and check.
I found this command line that worked for me.
Update from version 12.18 to the latest version 15.2 correctly.
I hope this is useful:
nvm install node --reinstall-packages-from=node
I think your question is replecated and already has an answer.
First, The LTS and current version of NPM is 5.6.0 for both Node 8.11.1 (LTS) and Node 10.0.0 (Latest current version) according to the official documentation.
Otherwise, sudo npm install npm#latest -g should install the latest version NPM globally.
Search for a node_modules folder in your home directory, rename it or delete it, then try again.
First uninstall your installed nodejs from Control Panel\All Control Panel Items\Programs and Features.
Delete nodejs folder from the Program Files (x86) folder.
Now install new version and check it once.
Though this is an old question and the answer might not be relevant but I found myself into such situation many time, sometimes restarting the server is not a solution because other process will get effected. So you need to refresh the terminal without actually restarting the server and for that you may run exec bash and that will certainly help.
I was facing the same error today.Updated npm version does not reflect.
This is how I resolved it.
A lot of post suggested to use the command npm cache clean --f. But, it did not work for me. Hence, I deleted the "npm" and "npm-cache" folders from the location C:\Users\SearchYourUserName\AppData\Roaming
Uninstalled the existing node.
Re-Installed node version v10.x.x. I downloaded the node-v10.22.1-x64.msi file from https://nodejs.org/dist/latest-v10.x/ and installed it.
Then checked the npm version. It had worked.
Actually this could be happening due to mistakes like you installing packages using yarn ex:
// update the version number in package.json then
yarn install
and trying to run scripts using npm like
npm run start
Actually I did this mistake.
So make sure to use either yarn or npm, but not both.
I faced a similar issue. I had node v14.15.4 installed on ubuntu 18, but when i used node -v it showed v11.0.0.
To check all the node versions available on your system using nvm, use
nvm ls
To set the newly installed node version as the default, use
nvm alias default <version>
Then, just close the terminal and open a new terminal to check the node version.
Problem summary
npm -v # 6.xx
npm install npm#latest -g
npm -v # still the same, but should be 7.xx
Solution based on the answer of fypnlp.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
The terminal now wants to configure some ~/.zshrc file which I don't have on my Mac yet. So let’s create it
nano ~/.zshrc
and paste
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Now restart the terminal and run
command -v nvm # should return "nvm"
nvm install node
npm -v # now it’s 7.xx yay!
I have this same symptom but none of the answers helped and I finally found the issue.
It may not be exactly the same as the OP's but I think it is along the same lines. #Kelvin Zhao's solution of un-installing and re-installing worked for him but not for me so this might be useful for others.
My issue ended up being that I use brew and (I can't remember how exactly) but I seem to be have an old version in the brew Celler.
Brew didn't know about it, or couldn't tell me as I do a brew uninstall node and it says its doesn't exist.
When I run node -v or npm -v I get the old versions.
I uninstalled and reinstalled using brew and npm and sudo npm etc didn't do it. it showed the correct versions being installed but node -v still showed the old.
Turns out there is a version in my /usr/local/Celler directory named node#14.
So running brew uninstall node#14 got rid of that and now node -v doesn't work anymore.
Now re-installing node works. brew install node
More info for further details for those interested.
I wanted to find out where I still had node installed so I did echo $PATH as it had to be somewhere in the path else node -v wouldn't be recognised.
Turns out I had /usr/local/opt/node#14 in my path (which linked to /usr/local/Celler/node#14)
That is how I found it.
And now I think I remember how it got there. I'm 90% sure that I did an upgrade of node and brew asked what to do with the old version and I think I said to keep it.
And that was my mistake that lead me here (and where I think OP's situation differs)
In my case, I wanted to use Version 18 and it was showing 16. I'm using homebrew on my mac and the command that worked for me was the following:
brew uninstall node#16
And voila the version that was showing after is 18.
I had issue with VS Code when I did nvm alias in its own terminal, even after ran alias command, the version kept switching back to old version even I open a new terminal within the VS Code. But as stupid as it sounds, close and reopen the vscode for me worked, after I set the version in an independent terminal.

sylius/metadata install in sylis beta 2

I installed the sylius v1.0.0-beta2 and symfony 3 but I have a bit problems when I install Sylius metadata.
When I launch the command composer.phar require sylius/metadata-bundle it return an error
Your requirements could not be resolved to an installable set of packages.
Problem 1
- don't install sylius/resource v0.19.0|don't install sylius/sylius v1.0.0-beta.2
- don't install sylius/resource v0.19.0|remove sylius/sylius v1.0.0-beta.2
- don't install sylius/resource v0.19.0|don't install sylius/sylius v1.0.0-beta.2
- sylius/metadata v0.19.0 requires sylius/resource ^0.19 -> satisfiable by sylius/resource[v0.19.0].
- sylius/metadata-bundle v0.19.0 requires sylius/metadata ^0.19 -> satisfiable by sylius/metadata[v0.19.0].
- Installation request for sylius/metadata-bundle ^0.19.0 -> satisfiable by sylius/metadata-bundle[v0.19.0].
- Installation request for sylius/sylius (locked at v1.0.0-beta.2, required as ^1.0#beta) -> satisfiable by sylius/sylius[v1.0.0-beta.2].
Installation failed, reverting ./composer.json to its original content.
How can I install it ?

How to install / upgrade Appium 1.6.3 / 1.6.x with Appium Version Manager

Appium 1.4.16 or any 1.4.x version works fine. We used Appium Version Manager (avm) to upgrade to new versions, but with 1.5.x onwards does not seem to be working.
I am currently on Appium 1.4.16 and would want to upgrade to Appium 1.6.3 (current latest). Can we do that?
Note - the reason we need avm is to switch between appium versions, which i feel is good to have. Helps us specially when we are in the process of upgrading our suite to cater the changes in 1.6.x, so that until we finish, we can still use an older (stable) version
Phew... after some searching, testing and playing around, found a way.
When Appium releases a newer version or a beta, I feel its an advantage to keep an older (stable) version and switch between Appium versions. Because in my experience, a newer Appium version could break some existing automation tests, so until we fix them separately, having an older version helps in executing those tests without errors.
Plus switching versions without every time needing to install / uninstall is advantageous while testing out a beta.
AVM was (rather is) a great utility that allows this switching between versions, but somehow it had stopped working after Appium1.5.0.
So here are the steps to use AVM to install Appium after version 1.5.0 and keep switching between as many instances of Appium.
At the moment, Appium1.6.4 is the official release, so I'll highlight the steps with that version.
(Also, I use a Mac but think installing it on Windows should be similar).
Steps to Install Appium with AVM:
Part A) Install AVM --> (first time only to get AVM)
Pre requisite --> install 'brew' and 'node'.
Launch terminal
npm install -g appium-version-manager
brew update
note: if step 2 did not execute, then perform steps 3 and 4.
(optional) sudo chown -R $(whoami):admin /usr/local
(optional) cd $(brew --prefix) && git fetch origin && git reset --hard origin/master
avm --help
If it shows list of commands, then congrats, avm is installed !!!
Now since AVM is not maintained since Appium1.5.0, we need to install a version < 1.5.0. Let us do with 1.4.16
Part B) Install Appium 1.4.16 (or any old version) --> (one time only)
avm 1.4.16
In Finder --> Go to Folder /usr/local/bin/ --> Open filename ‘avm’ in an editor
Search for method 'activate ()' and comment this line
ln -s $dir/node_modules/appium/bin/appium.js $AVM_PREFIX/bin/appium
replace with
ln -s $dir/node_modules/appium/build/lib/main.js $AVM_PREFIX/bin/appium
sample screenshot to edit 'activate ()' method
Similarly, Search for method 'execute_with_version ()' and comment this line
local bin=$VERSIONS_DIR/$version/node_modules/appium/bin/appium.js
replace with
local bin=$VERSIONS_DIR/$version/node_modules/appium/build/lib/main.js
note - i'll post a reference link that mentioned about this change being made to 'avm' file.
brew unlink node
brew install node6-lts (node version - v6.9.4)
and this is our final act !!! :)
Part C) Install Appium version 1.6.x (or any version above 1.5.0)
avm 1.6.x (x = minor version of appium. To install Appium version 1.6.4, in terminal type --> avm 1.6.4)
cd /usr/local/avm/versions/1.6.x/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
npm install -g ios-deploy
if step 3 does not install ios-deply try step 4.
(optional) sudo npm install --global --unsafe-perm=true ios-deploy
brew install carthage
./Scripts/bootstrap.sh
./Scripts/build.sh -d
Launch Xcode. For Appium1.6.4, I used Xcode8.3.1
In Finder, navigate to path in step 2. Open WebDriverAgent Project in Xcode.
Sign profiles. I select the WebDriverAgent project and click on the 'Automatically manage signing'. Then select the team profiles for WebDriverAgentLib and WebDriverAgentRunner.
Build the WebDriverAgent Project and Run. If it Succeeds, then welcome aboard Appium1.6.x via AVM.
More information on singing profiles for WDA in a nice detail manner here --> https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
note - while executing tests on real devices, if you get an Error 65, means the WebDriverAgent has not been signed properly.
Once installed, for any Future versions of Appium, only Part C is required, no need of Part A and Part B if you've got avm
credit to the creator of Appium-Version-Manager - abhinavsingh. ( couldn't post the link as I do not have a reputation > 10 yet)
Below is the command to install and upgrade specific version of appium.
Installation :
SYNTAX : npm install -g appium#versionNumber
e.g. : npm install -g appium#1.4.16
Upgrade :
SYNTAX : npm update -g appium#versionNumber
e.g. : npm update -g appium#1.4.16

JUI Extension for Yii 2 can not be installed

I want to install JUI Extension for Yii 2, but composer reports me the following issues:
Your requirements could not be resolved to an installable set of packages.
- yiisoft/yii2-jui 2.0.4 requires bower-asset/jquery-ui 1.11.*#stable -> no matching package found.
- yiisoft/yii2-jui 2.0.3 requires bower-asset/jquery-ui 1.11.*#stable -> no matching package found.
- yiisoft/yii2-jui 2.0.2 requires bower-asset/jquery-ui 1.11.*#stable -> no matching package found.
- yiisoft/yii2-jui 2.0.1 requires bower-asset/jquery-ui 1.11.*#stable -> no matching package found.
- yiisoft/yii2-jui 2.0.0 requires bower-asset/jquery-ui 1.11.*#stable -> no matching package found.
- Installation request for yiisoft/yii2-jui ^2.0 -> satisfiable by yiisoft/yii2-jui[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
What I can do in order to fix this?
Finally I found the solution:
If you want to install the JUI extension for Yii2, you should do the following steps:
Run the following composer command: php composer.phar require "fxp/composer-asset-plugin:~1.0"
Run php composer.phar update
Run php composer.phar require --prefer-dist yiisoft/yii2-jui
I had the same problem while I was trying to install Kartik's extension for Yii2 framework. Adding "fxp/composer-asset-plugin": "*" to the require section of my composer.json file solved it.
Need to install the Composer Asset Plugin first:
composer global require "fxp/composer-asset-plugin:~1.0"
This one worked for me