Skip to content
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

running npm install on a project while having sublime open: ERR syscall rename #1382

Closed
ztrange opened this issue Nov 17, 2016 · 3 comments
Closed

Comments

@ztrange
Copy link

ztrange commented Nov 17, 2016

  • A brief description
    I just started using sublime inside bash, running it with VcXsrv because I moved all my workspace to ~/sites since it performs better. Today, I tried running npm install (something that I was sure worked fine) but got: npm ERR! syscall rename. I saw Unable to install acorn npm package (inability to symlink on mounted drives) #3 and npm package fails to install "npm ERR! Error: EACCES: permission denied" #14 and tried the suggested solution npm config set unsafe-perm true but I still got the same error. I event tried running npm install from root (sudo su) but got the same error.
    I remembered that the recent changes to my environment were: moving my workspace to WSL exclusive fs ~/sites/... and started using linux sublime. So, I tried closing sublime and it worked. I tried several times and consistently was able to reproduce the error by having sublime running.

  • Expected results
    npm install works while sublime is running

  • Actual results (with terminal output if applicable)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN myproject-clients@1.0.0 No description
npm WARN myproject-clients@1.0.0 No repository field.
npm ERR! Linux 3.4.0+
npm ERR! argv "/home/ztrange/.nvm/versions/node/v6.9.1/bin/node" "/home/ztrange/.nvm/versions/node/v6.9.1/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.9
npm ERR! path /home/ztrange/sites/myproject-clients/node_modules/.staging/any-promise-47c55b56
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall rename

npm ERR! Error: EACCES: permission denied, rename '/home/ztrange/sites/myproject-clients/node_modules/.staging/any-promise-47c55b56' -> '/home/ztrange/sites/myproject-clients/node_modules/any-promise'
npm ERR!     at destStatted (/home/ztrange/.nvm/versions/node/v6.9.1/lib/node_modules/npm/lib/install/action/finalize.js:25:7)
npm ERR!     at /home/ztrange/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:264:29
npm ERR!     at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EACCES: permission denied, rename '/home/ztrange/sites/myproject-clients/node_modules/.staging/any-promise-47c55b56' -> '/home/ztrange/sites/myproject-clients/node_modules/any-promise'
npm ERR!     at Error (native)
npm ERR!  { Error: EACCES: permission denied, rename '/home/ztrange/sites/myproject-clients/node_modules/.staging/any-promise-47c55b56' -> '/home/ztrange/sites/myproject-clients/node_modules/any-promise'
npm ERR!     at destStatted (/home/ztrange/.nvm/versions/node/v6.9.1/lib/node_modules/npm/lib/install/action/finalize.js:25:7)
npm ERR!     at /home/ztrange/.nvm/versions/node/v6.9.1/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:264:29
npm ERR!     at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EACCES: permission denied, rename '/home/ztrange/sites/myproject-clients/node_modules/.staging/any-promise-47c55b56' -> '/home/ztrange/sites/myproject-clients/node_modules/any-promise'
npm ERR!     at Error (native) parent: 'myproject-clients' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ztrange/sites/myproject-clients/npm-debug.log
  • Your Windows build number
    14965

  • Steps / All commands required to reproduce the error from a brand new installation

Install nvm and node:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
$ nvm install 6

Install sublime

$ sudo add-apt-repository ppa:webupd8team/sublime-text-3
$ sudo apt-get update
$ sudo apt-get install sublime-text-installer

Install enough for gtk2 to run with VcXsrv

sudo apt-get install libgtk2.0-0 libgdk-pixbuf2.0-0 libfontconfig1 libxrender1 libx11-6 libglib2.0-0  libxft2 libfreetype6 libc6 zlib1g libpng12-0 libstdc++6-4.8-dbg-arm64-cross libgcc1

Reproduce error

$ cd ~/sites/myproject-clients
$ subl
$ npm install
  • Required packages and commands to install
    nvm
    node6
    sublime6
    some gtk2 stuff
@acshi
Copy link

acshi commented Dec 3, 2016

I have just encountered this exact same issue, but not with sublime. The offending program in my case seemed to be receiving a lot of inotify events while npm was running, so it is possible that the underlying issue is inotify listeners on the same files.

@benhillis benhillis removed the npm/nvm label May 24, 2018
@benhillis
Copy link
Member

Closing out issues, please repoen if you continue to have issues on newer versions of Windows.

@therealkenc
Copy link
Collaborator

This was dupe #2097, #2836, #1956, #966, etc etc which are all #1529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants