在 Docker 上为 Windows 安装 node-sass 时出现 npm 系统调用符号链接错误 -95

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

在我的应用程序中我有一个依赖项

"sass-loader": "^3.1.1"

我首先 运行 直接从 Windows 安装了一个 npm,但是当我尝试 运行 应用程序时它不起作用,因为节点版本不同或其他原因。所以它告诉我 运行:

npm rebuild node-sass

我尝试从容器中 运行 它,但随后出现错误

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'

我该如何解决这个问题?有没有办法解决这个错误并安装 node-sass?

目前正在使用:

运行 再次使用参数 -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.