npm EPROTO: protocol error, symlink
This could happen when using a virtual machine and synced folders, with Linux guest and Windows host. Stack trace might look similar to [bash] npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v5.10.1 npm ERR! npm v3.8.3 npm ERR! path ../express/bin/express npm ERR! code EPROTO npm ERR! errno -71 npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink ‘../express/bin/express’ -> ‘/vagrant/courselooper/node_modules/.bin/express’ [/bash]
So Windows and POSIX systems have different definitions and implementations for symlink
or shortcut
. To resolve this, add --no-bin-links
flag to npm:
npm install --no-bin-links
Written on April 14, 2016