npm ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../acorn/bin/acorn
npm ERR! dest /storage/emulated/0/bot-baiano/node_modules/.bin/acorn
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../acorn/bin/acorn' -> '/storage/emulated/0/bot-baiano/node_modules/.bin/acorn'
npm ERR! [Error: EACCES: permission denied, symlink '../acorn/bin/acorn' -> '/storage/emulated/0/bot-baiano/node_modules/.bin/acorn'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../acorn/bin/acorn',
npm ERR! dest: '/storage/emulated/0/bot-baiano/node_modules/.bin/acorn'
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! /data/data/com.termux/files/home/.npm/_logs/2022-05-27T14_44_58_844Z-debug-0.log
发布于 2022-06-04 16:33:55
问题在于,您正在尝试在您的电话存储(/ storage /仿真器)中安装软件包。你的手机不能完全进入那里。例如,你不能在那里创建符号链接。这是在termux文档解释的。
然后,建议在termux分区内工作($HOME/$前缀)。在这里,我测试了相同的命令,结果如下:
~/git-repo/test $ npm i ts-node-dev -D
added 65 packages, and audited 66 packages in 2s
6 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
在~/存储分区中可以找到一些解决方案,但是您可能会遇到其他与访问相关的问题。如果您需要访问termux之外的文件(例如,一些IDE应用程序),我在另一个非常类似的问题这里中解释了这个问题。
希望能帮上忙。
发布于 2022-06-04 23:16:28
如果您想继续在/storage/emulated
中安装,可以在npm命令的末尾使用--no-bin-links
命令。例如:
npm install ts-node-dev -D --no-bin-links
这段代码适用于我
https://stackoverflow.com/questions/72407250
复制相似问题