Kev*_*C-M 5 fat node.js npm raspberry-pi
我正在尝试为项目安装express,但是当我运行时npm i express它显示此错误:
npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../mime/cli.js
npm ERR! dest /media/pi/HMMM/Programming/nodejs/myFirstHTTPS/node_modules/.bin/mime
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/pi/HMMM/Programming/nodejs/myFirstHTTPS/node_modules/.bin/mime'
npm ERR! [Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/pi/HMMM/Programming/nodejs/myFirstHTTPS/node_modules/.bin/mime'] {
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../mime/cli.js',
npm ERR! dest: '/media/pi/HMMM/Programming/nodejs/myFirstHTTPS/node_modules/.bin/mime'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-12-31T21_49_55_020Z-debug.log
Run Code Online (Sandbox Code Playgroud)
我在带有最新版本的 raspberry pi 操作系统的 raspberry pi 4 上运行 node 和 npm。请解释出了什么问题以及如何修复它
看起来您正尝试在 SD 卡或 USB 驱动器上安装,我假设其格式为 FAT32。不幸的是,FAT32 不支持符号链接。
你可以试试这个:
npm install --no-bin-links express
Run Code Online (Sandbox Code Playgroud)
如果这不起作用,您将不得不使用 FAT32 以外的文件系统。
小智 1
似乎是权限问题。
如果你使用的是 Mac,请运行:
sudo npm install express
Run Code Online (Sandbox Code Playgroud)
如果你在 Windows 上,我不确定是否有相同的操作,但你必须以管理员身份运行。
| 归档时间: |
|
| 查看次数: |
428 次 |
| 最近记录: |