I'm trying to install Chromium with Chocolatey: choco install -y chromium
I get the following output:
Installing the following packages:
chromium
By installing, you accept licenses for the packages.
Progress: Downloading chromium 104.0.5112.102... 100%
chromium v104.0.5112.102 [Approved]
chromium package files install completed. Performing other installation steps.
Chromium 104.0.5112.102 is already installed.
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of chromium was successful.
Software installed to 'C:\Program Files\Chromium\Application'
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
However, no folder is created for the Chromium application in C:\Program Files. I am getting a new installation of the NuGet for Chromium in C:\ProgramData\chocolatey\lib\chromium.
I'm doing this as part of an attempt to automate a Chromium installation, so I've been messing around with lots of different chromium versions and force installs. The line Chromium 104.0.5112.102 is already installed. looks pretty suspect, as does the note in the Chocolatey chromium page that says that sometimes the package will be installed on %localappdata%\Chromium instead, but I can't find chromium installed in C:\Users\jkatofsky\AppData\Local either.
I feel like the issue is just within reach, but I can't figure it out. Any ideas?
The package is already installed (note I said package) so it won't be installed again. I think messing around with versions has caused that issue.
Uninstall the package and install it again.
Doing choco uninstall -n --skipautouninstaller chromium and going to Control Panel -> Programs -> Uninstall a program then uninstalling Chromium, and getting rid of it from the registry when prompted, fixed things for me. The next choco install chromium worked as expected.
I installed shopify-cli using homebrew on my Mac and tried verifying the installation by running shopify version, but I get an error:
/usr/local/bin/shopify: line 2: /opt/homebrew/Cellar/ruby/3.0.1/bin/ruby: No such file or directory
Any idea what needs to be fixed?
Try running brew install ruby#3.0. It worked for me!
It appears that shopify-cli was installed when your Homebrew ruby was at version 3.0.1. This can be fixed by running the following command:
brew reinstall shopify-cli
(Ideally, the shopify-cli formula should be updated by its maintainers to replace hardcoded ruby paths to the version-agnostic /opt/homebrew/opt/ruby. Alternatively, they could track the Homebrew ruby version and bump the revision of shopify-cli whenever an update occurs. This will prompt end-users to run brew upgrade, which will automatically reinstall shopify-cli.)
I'm getting a consistent error when trying to use the html-pdf package in my node application:
StatusError: Error: spawn /home/site/wwwroot/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT
As far as I can tell everything is installed correctly and the npm install works as expected. My suspicion is that there is some missing dependency in the built-in linux image, but I'm not sure how to confirm that.
According to the information comes from the Download PhantomJS page, there is two note for Linux Distributions as below.
Note: For this static build, the binary is self-contained. There is no requirement to install Qt, WebKit, or any other libraries. It however still relies on Fontconfig (the package fontconfig or libfontconfig, depending on the distribution). The system must have GLIBCXX_3.4.9 and GLIBC_2.7.
So the native package fontconfig or libfontconfig must have been installed in docker image first.
For Debian/Ubuntu system, you can add RUN apt install fontconfig in the docker file, and check the package installed whether be exists via the command dpkg -l|grep fontconfig.
For Fedora/CentOS system, add RUN yum install -y fontconfig, and check the installed on via yum list installed|grep fontconfig.
on a Windows 10 machine and using nvm4w I tried:
from the above image:
node --version to check the current version
nvm list to list installed versions
nvm use 8.8.1 so we switch from 6 to 8
nvm on to enable it
node --version to re-check the node version
what am I doing wrong?
I had to delete the folder located at C:\Program Files\nodejs:
And then run nvm use {version} again to repopulate this folder with the correct node version.
I suspect that nvm is having trouble deleting this folder due to permission issues.
So I found a workaround.
I renamed C:\Program Files\nodejs to C:\Program Files\nodejsx
and then running nvm use versionNumber works fine.
Seems like nvm cannot change it to a symlink and fails silently.
I was also facing the same issue.
I had node version 14.15.1 installed in my machine and had to use 12.16.1
I'm using Windows 10.
After installing 12.16.1 via nvm it was showing only this version in nvm list and it wasn't showing current version in use.
Even after node use 12.16.1 the node -v was still showing 14.15.1.
Steps to resolve this issue:
Uninstall Nodejs from control panel.
Install Nodejs 12.16.1 using nvm install 12.16.1
Install Nodejs 14.15.1 using nvm install 14.15.1 (or the version which got uninstalled)
Switch version using nvm use 12.16.1 (change the version number accordingly)
Result:
C:\>nvm list
14.15.1
* 12.16.1 (Currently using 64-bit executable)
12.3.1
C:\>node -v
v12.16.1
nvm works based on the fundamental idea of symlinks. When a user is trying to hit the command nvm install <node_version> the entered version of node is getting installed even if you have changed the C:\Program Files\nodejs to C:\Program Files\nodejsx.
If nvm fails to create the new folder C:\Program Files\nodejs it will fail silently and you won't be informed.
You must manually check for the existence of the path C:\Program Files\nodejs if it exits then delete the folder and change the node path in your environmental variables. This will help you to figure out the version of the npm command.
Your problem can be solved by reinstalling the nvm version with Administrator privileges or just by renaming the folder C:\Program Files\nodejs
You can find further information here: https://github.com/coreybutler/nvm-windows/issues/67
This happens to be the issue till date and deleting nodejs folder does not work.
Just run nvm install using cmd as administrator.
So even if you have downloaded nodejs from cmd without admin privilages, uninstall it and install again using cmd as admin.
This is what worked for me after trying almost every solution from github and stackoverflow.
For me the problem (on Linux) was that I had installed node with Homebrew, and it was preventing the use of nvm. Before nvm could set up the correct symlink, I had to
brew uninstall node
I first found out about this situation by running
which node
This told me that node was being symlinked from Homebrew at
/home/linuxbrew/.linuxbrew/bin/node
instead of, as we want, from nvm at
/home/john/.nvm/versions...
As soon as "which node" reported that it was using the node from nvm, things were resolved for me.
1) Install NVM from the link : https://github.com/coreybutler/nvm-windows/releases.
2) Copy the settings.txt from the "C:\Users\YOUR_USERNAME\AppData\Roaming\nvm". to "C:\Users\ YOUR_USERNAME"
3) Restart your system for the changes to reflect.
4) Open the console and type below command :
nvm list
5) To install the 6.9.3 version run the below command :
nvm install 6.9.3
6) After the installation is complete it will add the node version in the nvm. To check the same type command :
nvm list
7) To switch the command version type command below command :
nvm use 6.9.3
To verify the node version switch type the command “node –v”
8) Its will display the node version in use.
For more details please check the below link :
https://www.tutespace.com/2018/11/nvm-installation-on-windows.html
Let us know if you still face the same issue.
I had the same problem.
My solution is that i uninstalled nodejs via chocolatey (the way i installed it) and then nvm worked again.
After checking the nodejs folder in C:/Program Files i noticed that nvm probably works via creating a link/shortcut to the nvm folder where the different versions of nodejs are stored. That´s the way the "Path" and everything works.
I hope that helped.
I have tried to switch Node version using nvm but it is not reflecting so I deleted the folder inside c:/program files/nodejs
after deleting the folder follow the same steps to switch the npm version using nvm and it will switch the node version.
The steps I had to follow were:
Uninstall node if there was an installation outside of nvm
Ensure "C:\Program Files\nodejs" was deleted before installing nvm
Install nvm which still fails to install node but from the errors it seems that's because its ultimately pointing at urls that have been decomissioned
Use "nvm install NODE_VERSION" to install at least 2 versions of node which again fail as in 3)
Download the versions of node I tried to install and unzip the entire contents to their respective %appdata%/nvm/vNode_version folders
Use "nvm use NODE_VERSION" to switch between either version I've installed [but be careful... "npm -v" did not work until in visual studio until I closed and re-opened the program]
If anyone knows how to point nvm to the up to date urls, it'd be great to know. I suspect everything would work fine when running nvm from powershell run as administrator
Follow this step
1.delete node and npm in path
To Find Path
which node
output
/c/Users/balaji/AppData/Roaming/npm/node
which npm
output
/c/program files/node.js
2.To list out version
nvm list
3.set node
nvm use version
To know remote version
nvm list available
To know local version
nvm list
Yet another answer because none of the others helped me.
Setup
Windows 11
Multiple accounts
Non-default install and symlink directories
I installed nvm using different directories than the default because this is necessary to avoid:
Issues due to spaces in the path
Issues when using nvm on two different accounts on the same machine
Solution
This solution works for any number of accounts on the same machine.
Uninstall any nvm and nodejs you have.
Make sure no directory from them remains (in Program Files, Program Files (x86) and any other place you might have tried installing nvm/nodejs)
Reinstall nvm with:
An installation path that contains no spaces, and is not in any specific user's directory (e.g. C:\nvm)
A symlink path that contains no spaces, is not in any specific user's directory, and is not under nvm's directory (e.g. C:\nodejs)
Open your shell as administrator, install your desired node version(s) (e.g. nvm install lts) and activate one (e.g. nvm use 18)
Test that the version was activated correctly with nvm current and node --version
Every time you change your node version with nvm use or install a new one with nvm install, do it in an administrator shell
None of the above helped in my case.
I could see the symlink was created and correct but NVM4W would still not "use" the correct version.
The node version I had installed with NVM was not compatible with my version of Windows.
When you run "nvm ls" or "nvm current", it calls GetCurrentVersion() which runs "node -v" in the command line. If that output is anything other than the current version, such as the warning that you are running an incompatible OS, it will fail to indicate the currently selected version. It does so in a way that is not obvious why "nvm use x" did not work.
You can bypass the node OS check with an environment variable (node version >=14 as far as I could find):
How to set the NODE_SKIP_PLATFORM_CHECK environment variable to 1 which skips the version check
Though you may need to update Windows or use an earlier version of node if node doesn't function as expected.
With that set, "nvm use" functioned as expected.
I met this problem this morning. And I think the reason for the problem is that it's different between the nvm's settings and env configuration. I solved it the following way.
open the path of nvm installation.
open the setting.txt file and have a check with the path value.
open the environment variables Control panel in Windows.
check if it's the same between the value of NVM_SYMLINK in the system path and path in the setting.txt
change two configuration to same values.
Mine was caused by EMSDK. which I set on my .zshrc to load it automatically. removed the emsdk related lines, and the node was following nvm.
On Windows uninstalling Node.js at Control Panel > Programs > Uninstall a program, and letting nvm install the desired node versions also solves this issue.
In my case the things didn't work as described inside CI/CD service (TeamCity to be exact). I spent half a day, trying to find a solution and tried everything mentioned here and other similar questions. So, what worked:
Perform a clean install of nvm (removing older standalone versions of nodejs fist), as specified by multiple other answers. Install node versions only using nvm.
Make sure that process that is running your "nvm use" command has "Full Control" privilege to the root of nvm installation. So that it could delete the symbolic link "nodejs" folder when switching versions.
Change a policy on your server to allow that same account creating symbolic links:
This point was, somehow, not mentioned by anyone anywhere, so it took me very long time to figure this out.
Platform: Ubuntu 14.10
Appium - 1.3.7
One similar question I had come across -
How to setup Appium in Ubuntu for android
and following suggestion, I install npm via HomeBrew
And eventually, appium execution fails with error -
error: Appium will not work if used or installed with sudo. Please rerun/install as a non-root user. If you had to install Appium using `sudo npm install -g appium`, the solution is to reinstall Node using a method (Homebrew, for example) that doesn't require sudo to install global npm packages.
Is there anything I missed?
Appium allows to run under sudo since 1.2.3: source
apparently I was on wrong directory when invoking invoking appium. I should be in /node-v0.12.2-linux-x64/bin$ and invoke appium.
even though I was in wrong directory, the error message I received was so descriptive (and misleading) that it made me believe that I installed appium in wrong way.