tomitrescak
tomitrescak

Reputation: 1110

Installing node module in Docker on Windows fails on symlink creation

I have a nodejs docker instance running in Windows. I have mounted a write-enabled windows directory to the docker instance. I am trying to install shelljs into my project but it is failing with a following error:

npm ERR! Linux 4.0.9-boot2docker
npm ERR! argv "/opt/nodejs/bin/node" "/usr/bin/npm" "install" "shelljs"
npm ERR! node v4.1.2
npm ERR! npm  v2.14.4
npm ERR! path ../shelljs/bin/shjs
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../shelljs/bin/shjs' -> '/home/app/meteor-webpack-react/node_modules/.bin/shjs'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Linux 4.0.9-boot2docker
npm ERR! argv "/opt/nodejs/bin/node" "/usr/bin/npm" "install" "shelljs"
npm ERR! node v4.1.2
npm ERR! npm  v2.14.4
npm ERR! path npm-debug.log.907b6eb81436ba935104c98d206fb37c
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename

npm ERR! ETXTBSY: text file is busy, rename 'npm-debug.log.907b6eb81436ba935104c98d206fb37c' -> 'npm-debug.log'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/app/meteor-webpack-react/npm-debug.log

Please note that I have enabled symlink creation (http://www.ahtik.com/blog/fixing-your-virtualbox-shared-folder-symlink-error/) and they can be done manually via ln -s. I am running a machine as administrator.

Any idea of why the symlinks are failing. I thought that it is because the npm cache is in the virtual machine trying to symlink to windows directory, but trying to move cache to windows directory failed as well (npm config set cache ~/.npm --global)

Upvotes: 2

Views: 831

Answers (1)

Subhas
Subhas

Reputation: 14408

Have you made sure you have installed Virtualbox Extension Pack for the right version of VirtualBox? Usually that is the culprit.

Upvotes: 1

Related Questions