Tag: npm

NPM workaround for EROFS error

On my Virtualbox with lubuntu, upon running npm install I encountered problems with installing some packges.

npm ERR! rofs EROFS, symlink '../rimraf/bin.js'
npm ERR! rofs This is most likely not a problem with npm itself
npm ERR! rofs and is related to the file system being read-only.
npm ERR! rofs 
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don't support symlinks, give this error.

As the error explains, this probably has to do with the filesystem being virtualized. This was also in a shared folder with the host machine.

To work around this, use the –no-bin-link command option to prevent npm from attempting to create symbolic links. As a result, the commands of the package will not be available in _node_modules/.bin_. But it will still be available from the bin folder of the package itself.

Leave a Comment