nvs icon indicating copy to clipboard operation
nvs copied to clipboard

MSI uninstall fails with error code 2318

Open aruneshchandra opened this issue 8 years ago • 8 comments

nvs-error

aruneshchandra avatar Dec 09 '16 18:12 aruneshchandra

The workaround is to manually delete the folder "%LOCALAPPDATA%\nvs\ch" launch Admin PowerShell console and use the following command. rm -recurse C:\Users\<username>\AppData\Local\nvs\ch -force

aruneshchandra avatar Dec 09 '16 18:12 aruneshchandra

This is a MAX_PATH problem. If you have installed under AppData\Local (the default for a per-user MSI install) and added some nightly builds having a long tag in the semantic version, e.g. 7.0.0-nightly2016112559950ad1e8, then some of the npm module files may have paths slightly exceeding 260 characters. Those paths will cause Windows Installer to fail and rollback when trying to clean up those files on uninstall.

Note in the suggested workaround above, you will need to replace ch with whatever remote name you used for the nightly builds:

rm -Recurse -Force "$env:LOCALAPPDATA\nvs\$remoteName"

jasongin avatar Dec 09 '16 18:12 jasongin

I want to keep this issue open, because other people may hit this. I'd like to fix it, but it might not be easy.

jasongin avatar Dec 09 '16 21:12 jasongin

I must have had a really deep directory structure (there were quite a few "node_modules" folders in the path), so the workaround didn't quite work for me.

Ultimately I had to use robocopy to move the folder:

robocopy /s /move "$env:LOCALAPPDATA\nvs\$remoteName" "C:\f\"

Then delete the folder I created:

rm -Recurse -Force "C:\f\"

After I did that the upgrade succeeded.

kfarnung avatar Mar 01 '17 00:03 kfarnung

It happened to me too while upgrading from 1.2.0 to 1.3.0. I had to create a symlink to the nvs install directory, remove node from there, and install 1.3.0 again:

C:\>mklink /D nvs "%LOCALAPPDATA%\nvs"
C:\>pushd nvs
C:\nvs>rd /s /q node
C:\nvs>popd
C:\>pushd "%LOCALAPPDATA%"
C:\Users\username\AppData\Local>rd /s /q nvs
C:\Users\username\AppData\Local>popd
C:\>

ealib avatar Jul 02 '17 12:07 ealib

@jasongin Hi thanks for pointing me to this issue. But I was able to solve this issue by installing it manually using an elevated command prompt. I used the below commands from the manual installation instruction.

set NVS_HOME=%ProgramData%\nvs git clone https://github.com/jasongin/nvs "%NVS_HOME%" "%NVS_HOME%\nvs.cmd" install nvs --version

And it was successfully updated.

vickylance avatar Jul 22 '17 05:07 vickylance

i hit this problem on my mac.

kxws888 avatar Dec 27 '17 02:12 kxws888

@kxws888 this should be a Windows-specific problem. If you're seeing issues on macOS can you open a new issue including any error output?

kfarnung avatar Dec 27 '17 02:12 kfarnung