-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR open \settings.txt: The system cannot find the file specified. #945
Comments
I'm not sure how winget is doing things (I don't maintain that installer). I typically recommend people follow the manual installation guide when attempting to automate installation. In this case, you may just need to touch the settings.txt file or assure it can be read. Your screenshot shows the settings file, so I'm not sure why it's not recognizing it. Is this a US English locale? |
Corey, I'm also noticing the same issue and I've manually installed it. I've tried to use the command line as an administrator and still no luck. EDIT: I resolved the issue, and this is probably the issue that he is having too. the name of the file shouldn't be settings.txt it should just be named settings with a txt file type |
It should work with the |
my settings.txt was created by the installer. I checked that it is UTF-8 and it is. |
I'm on English UK ("International").
I had the same thought too. |
Please check the value of the |
…h new encoding for settings (forcing UTF-8).
This is also happening to me with a fresh install using the installer on Windows 11. |
how to fix it? |
This should be resolved by upgrading to v1.1.11. In v1.1.11, there is also a |
Still encountering this issue on 1.1.11: C:\Program Files\nvm>nvm debug ERROR open \settings.txt: The system cannot find the file specified. C:\Program Files\nvm>nvm --version |
I'm also running into this issue with nvm version 1.1.11. |
Also encountering this issue with nvm version 1.1.11. I'm using InnoSetup. While the terminal is still open (hasn't been restarted yet), I've checked my environment variable values. They are set correctly- as is my path, for both the user and system (admin). This isn't using the manual install. I can see the settings text document file in I tried |
I have been suspicious of that path since I made this issue. I'm fairly sure it's because of the missing a dot, this is trivially easy to reproduce, it's trying to look on the root of C:. It needs to be var home = filepath.Clean(os.Getenv("NVM_HOME") + "\\settings.txt") Line 52 in c1a6337
|
On my case, the issue was not having reopened the terminal after installation so that NVM_HOME was set. I had closed and opened new tabs but that does not trigger an environment reload on Windows I guess. |
@mikaelmello it depends on which app is running powershell. The tabbed tools typically don't reload the environment until the app is reopened (VS Code is the same way). I wish there were a clearer way to determine this behavior, but every shell app is different. |
I'm still struggling with this- trying to install nvm with Inno Setup. I've stepped through the install script I made in debug mode, and it's not finding the settings.txt file, even though the correct env variables are set, and they are present on the PATH (for system and user). Are there any tricks for dealing with this, if you can't restart the terminal? -EDIT- I'm discovering now that when I look at defined environmental variables using |
A slight improvement on the ux might be what other Linux projects do after a install on the terminal: printing the necessary commands to set the variables for this session. |
Unfortunately that wouldn't be a solution for us...the installer needs to be pretty much hands off, for our very not tech-savvy users. I couldn't get this to install successfully using Inno Setup to create an installer. It seems the issue boiled down to the environmental variables not being recognized. They were set correctly, but just not from the terminal's perspective. That is to say, I could find the environmental variables correctly set while clicking through windows settings, or viewing them in the registry, but when I used the From that termainal, I could successfully call the |
This error is because your current command line prompt does not have %NVM_HOME%, just close your command prompt and open it again and it should work. |
Is this a serious reply or some AI generated reply? Please read original issue comment to understand this problem, it’s context, and usage with automation scripts and tools like winget. |
Actually @lloydjatkinson, @bitdeep's comment isn't necessarily off-base. If I'd also like to point out that I do't maintain the winget package, or the scoop package. The official installer, which was written with InnoSetup, should setup the environment variables appropriately. Upon completion of install, restarting the terminal may be required because InnoSetup ometimes has an untraceable race condition where the terminal launches/reloads before the environment variables are created. It's an annoying InnoSetup problem I have not found a solution to. |
It's not ai generated ser, I just had this issue. So I decided to drop a come here to help people. |
Issue:
After installing nvm (from WinGet in this case) and before restarting the terminal, attempting to use nvm will fail.
Now, you might think that restarting the terminal is a simple action the user can do but when you are trying to automate the installation of a bunch of apps and developer tools, it's not a viable solution to restart the terminal.
Running nvm at this point will fail with the expected error:
nvm: The term 'nvm' is not recognised as the name of...
So the next step would be to invoke nvm directly, which fails with this error:
How To Reproduce:
winget install --id=CoreyButler.NVMforWindows -e
Expected Behaviour:
It should be possible to automate the installation of developer tooling including nvm without needing to restart the terminal and thus no longer be possible to automate.
Screenshots:
Desktop:
Additional context:
If this is some hard to fix error, could it be possible to add an argument to nvm which accepts a path of the settings file to use?
The text was updated successfully, but these errors were encountered: