WSL icon indicating copy to clipboard operation
WSL copied to clipboard

nvm: Node installation fails

Open peterjuras opened this issue 10 years ago • 20 comments

Hi!

I'm trying to get multiple node versions running under bash on Windows. Installing nvm works fine, however trying to install any node versions errors out with:

tar: bin/npm: Cannot utime: Operation not permitted

To reproduce:

  1. Install nvm via curl script from creationix/nvm
  2. Try to install a node version nvm install 4

peterjuras avatar Apr 24 '16 21:04 peterjuras

I'll give this a try on our internal build tomorrow. I've fixed some node issues recently so this may be fixed.

benhillis avatar Apr 24 '16 21:04 benhillis

Looks like we're getting past the tar error but I'm getting a different error ENOTTY error. We have a bunch of additional pts / tty support in the pipeline so we should try this again once that's finished.

root@BENHILL-VM3:~# nvm install 4
Downloading https://nodejs.org/dist/v4.4.3/node-v4.4.3-linux-x64.tar.xz...
######################################################################## 100.0%
fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: Unknown system error -25: Unknown system error -25, open '/root/.nvm/versions/node/v4.4.3/lib/node_modules/npm/bin/npm-cli.js'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.readFileSync (fs.js:397:15)
    at Object.Module._extensions..js (module.js:415:20)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v4.4.3` to unset it.

benhillis avatar Apr 24 '16 23:04 benhillis

Also got node problem binding.open error. BTW, can we dream if PIPE between windows and linux apps? That'll be really great. Only a bridge is needed to send/get message, isn't that easy?

bihai avatar Apr 25 '16 00:04 bihai

We have a couple of interop requests on our User Voice page. I do not remember any specifically for PIPEs.

russalex avatar Apr 25 '16 17:04 russalex

Getting the same error as @benhillis on insider build 14332.

cheshrkat avatar May 01 '16 12:05 cheshrkat

Same error as @benhillis

babsonmatt avatar May 04 '16 05:05 babsonmatt

Same error here

danibram avatar May 06 '16 14:05 danibram

I dug into this issue today and I now have a fix in code review. With my fix I was able to use NVM to install nodejs 4 without issues.

benhillis avatar May 06 '16 15:05 benhillis

How can I get(or build) the latest build of bash on windows ?

kebot avatar May 09 '16 10:05 kebot

@kebot - New builds will be periodically released via the Windows Insider program. Unfortunately we are closely tied to the Insider build release schedule but are investigating ways to make our releases more frequent in the future.

benhillis avatar May 09 '16 15:05 benhillis

@benhillis Did this fix make it into build 14342? I'm still getting errors with last night's update.

johnlindquist avatar May 11 '16 22:05 johnlindquist

@johnlindquist No unfortunately this change was only checked into our development branch early this week. It will still be a little while before this in in an insider build. We'll make sure to call out the fix in our release notes.

benhillis avatar May 11 '16 22:05 benhillis

Also getting this issue.

akashdeep-singh avatar May 19 '16 14:05 akashdeep-singh

FYI just updated my Insider Preview VM to build 14352, uninstalled NVM and reinstalled - still getting an error.

user@hostname:~/path/to/project$ nvm install
Found '/path/to/.nvmrc' with version <5.4.1>
Downloading https://nodejs.org/dist/v5.4.1/node-v5.4.1-linux-x64.tar.xz...
######################################################################## 100.0%
fs.js:584
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: Unknown system error -25: Unknown system error -25, open '/home/user/.nvm/versions/node/v5.4.1/lib/node_modules/npm/bin/npm-cli.js'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at Object.Module._extensions..js (module.js:403:20)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:429:10)
    at startup (node.js:139:18)
    at node.js:999:3
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `npm config delete prefix` or `nvm use --delete-prefix v5.4.1` to unset it.
user@hostname:~/path/to/project$

Running the delete prefix commands doesn't resolve.

Tried reinstalling nvm and also reinstalling bash-on-windows ('lxrun /uninstall' then 'bash'), but still getting the problem.

cheshrkat avatar May 27 '16 03:05 cheshrkat

I am seeing the same in 14352, even after reinstalling Bash On Windows

mizzle-mo avatar May 27 '16 06:05 mizzle-mo

Fix is on the way. Just taking a little time to get on the insider fast ring. I have confirmed two versions of Node installed and managed through nvm on an internal build. Hopefully not much longer.

russ@RUSSALEX-BOOK:~$ nvm list -> v5.4.1 v6.0.0 default -> v6.0.0 node -> stable (-> v6.0.0) (default) stable -> 6.0 (-> v6.0.0) (default) iojs -> N/A (default) russ@RUSSALEX-BOOK:~$ node -v v5.4.1 russ@RUSSALEX-BOOK:~$ nvm use 6.0.0 Now using node v6.0.0 (npm v3.8.6) russ@RUSSALEX-BOOK:~$ node -v v6.0.0 russ@RUSSALEX-BOOK:~$

russalex avatar May 31 '16 20:05 russalex

@russalex thanks! appreciate the work and the updates :)

cheshrkat avatar Jun 02 '16 09:06 cheshrkat

still seeing the issue, is it resolved? @russalex

neoadventist avatar Jun 03 '16 18:06 neoadventist

Not out in 14352. What I was showing off above is an internal build. The fix is on the way. Unfortunately I can not give an ETA. Hopefully not too much longer before it hits the Insider fast ring.

russalex avatar Jun 03 '16 20:06 russalex

Appears to be much better in Build 14361:

jason@COMPUTER:~$ nvm install v6.2.1 Downloading https://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-x64.tar.xz... ######################################################################## 100.0% Now using node v6.2.1 (npm v3.9.3) Creating default alias: default -> v6.2.1 jason@COMPUTER:~$ node -v v6.2.1 jason@COMPUTER:~$ npm -v 3.9.3 jason@COMPUTER:~$ npm install npm -g jason@COMPUTER:~$ npm -v 3.9.5

JasonDunbar avatar Jun 10 '16 16:06 JasonDunbar