npm install 在 FAT32 单机系统上失败 [英] npm install fails on FAT32 sile system

查看:103
本文介绍了npm install 在 FAT32 单机系统上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 FAT32 驱动器上的文件夹中运行 npm install,这是我收到的错误:

I'm trying to run npm install in a folder on my FAT32 drive, and this is the error I'm getting:

$ npm install
/work/sites/project
└── (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.8.0-27-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! path ../semver/bin/semver
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall symlink

npm ERR! Error: EPERM: operation not permitted, symlink '../semver/bin/semver' -> '/work/sites/project/node_modules/accord/node_modules/.bin/semver'
npm ERR!     at Error (native)
npm ERR!  { Error: EPERM: operation not permitted, symlink '../semver/bin/semver' -> '/work/sites/project/node_modules/accord/node_modules/.bin/semver'
npm ERR!     at Error (native)
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../semver/bin/semver',
npm ERR!   dest: '/work/sites/project/node_modules/accord/node_modules/.bin/semver',
npm ERR!   parent: 'accord' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /work/sites/project/npm-debug.log
npm ERR! code 1
$

到目前为止,我了解到问题是由 FAT32 不支持符号链接和/或 chmod 引起的.但是真的没有办法解决这个问题吗?

So far I understand that the problem is caused by FAT32 not supporting symlinks and/or chmod. But is it really true that there's no work-around for this?

GitHub 上存在一个问题,维护人员同意这一点是一个bug,应该修复,但线程已经闲置一年多了.

There is an issue open for this on GitHub, where maintainers agree that this is a bug and should be fixed, but the thread has been idle for over a year now.

也在同一个线程中,用户 mgiorgino 提到在 Windows 下运行 npm install 不会出现此错误.我没有机会确认这一点,那么在 Windows 上有没有人能够在 FAT32 文件系统上成功运行 npm install ?如果是,有什么方法可以让我们在 Linux 下获得相同的功能?

Also in the same thread user mgiorgino mentions that npm install run under Windows does not make this error. I don't have a chance to confirm this, so is there anyone on Windows who was able to successfully run npm install on a FAT32 file system? If yes, is there any way that we get the same functionality under Linux?

最后,环顾网络,我发现了 FAT32 文件系统驱动程序FAT16/FAT32 文件系统实现 包.由于他们的文档都非常稀缺,所以我不知道他们是否可以帮助解决这个问题?

Finally, looking around the web I found FAT32 file system driver and FAT16/FAT32 filesystem implementation packages. Since both their documentation is very scarce, so I can't tell if they can help fix this problem?

推荐答案

尝试通过运行 npm install npm@latest -g 来更新 npm.我运行了那个命令,它更新到了 v4.0.2.如果与代码相关,最近的更新可能包含修复.npm 文档页面页脚中的命令.

Try updating npm by running npm install npm@latest -g. I ran that command and it updated to v4.0.2. The recent updates could contain a fix if it is code related. Command in footer of the npm docs page.

禁用符号链接有助于许多用户在 系统上使用 npm install 时无法创建符号链接.要使用符号链接关闭 npm,请通过运行 npm config set bin-links false 在 npm 配置中将 bin-links 设置为 false.您可以选择每次运行 npm install --no-bin-links.第一个命令对 npm 配置进行了更改,因此您不必每次运行 npm install 时都添加 --no-bin-links 标志.这是 npm 配置文档中推荐的方法,用于让 npm 在不支持符号链接的系统/驱动器上工作.

Disabling symlinks helped a number of users when using npm install on systems unable to create symlinks. To turn off npm using symlinks set bin-links to false in the npm config by running npm config set bin-links false. Optionally you can run npm install --no-bin-links each time. The first command makes the change to the npm config so you don't have to add the --no-bin-links flag each time you run npm install. This is the method recommended in the npm config docs to get npm working on systems/drives that don't support symlinks.

这篇关于npm install 在 FAT32 单机系统上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆