Search code examples
node.jsdockerhyper-v

npm syscall symlink error -95 when installing node-sass on Docker for Windows


In my application I have a dependency

"sass-loader": "^3.1.1"

I first ran a npm install directly from Windows, but when I tried to run the application it didn't work because the node version is different or something. So it told me to run:

npm rebuild node-sass

I tried to run it from within the container, but then I got an error

npm ERR! code ENOTSUP
npm ERR! errno -95
npm ERR! syscall symlink

npm ERR! nospc ENOTSUP: operation not supported on socket, symlink '../node-sass/bin/node-sass' -> '/usr/src/app/node_modules/.bin/node-sass'

How can I fix this? Is there a way to get around this error and install node-sass?

Currently using:

  • Windows 10 Pro
  • Docker 1.11.1-beta10 (build: 2446)

Solution

  • Run the command again with the parameter -no-bin-links

    npm rebuild node-sass -no-bin-links
    

    bin-links from NPM docs:

    Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.