簡體   English   中英

Termux - npm ERR:錯誤:EPERM,不允許操作,符號鏈接

[英]Termux - npm ERR! Error: EPERM: operation not permitted, symlink

每當我安裝 npm 包(如:Puppeteer、Nightmare、Playwright)時,我都會收到相同的錯誤消息

但是當我安裝 npm-packages(axios、http、axios 等)幾乎所有的小包時,它都沒有顯示出來......!

npm 安裝劇作家

npm ERR! code EPERM
npm ERR! syscall symlink
npm ERR! path ../playwright/cli.js
npm ERR! dest /storage/emulated/0/Android/data/io.spck.editor.node/files/Alexa Kairen || Doruk/node_modules/.bin/playwright
npm ERR! errno -1
npm ERR! Error: EPERM: operation not permitted, symlink '../playwright/cli.js' -> '/storage/emulated/0/Android/data/io.spck.editor.node/files/Alexa Kairen || Doruk/node_modules/.bin/playwright'
npm ERR!  [Error: EPERM: operation not permitted, symlink '../playwright/cli.js' -> '/storage/emulated/0/Android/data/io.spck.editor.node/files/Alexa Kairen || Doruk/node_modules/.bin/playwright'] {
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../playwright/cli.js',
npm ERR!   dest: '/storage/emulated/0/Android/data/io.spck.editor.node/files/Alexa Kairen || Doruk/node_modules/.bin/playwright'
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-08-10T13_22_34_261Z-debug-0.log

嘗試安裝帶有標志--no-bin-links的包, npm install --no-bin-links playwright

注意:不要將我的 android 設置為英文,因此設置可能會有不同的翻譯。

  1. 將 Termux 應用程序放在手機上
  2. 點擊App-info
  3. RightsPermissions
  4. 單擊Files and media並授予權限。
  5. 再試一次

像那樣使用

npm run d -package=@types/node

"scripts": {
     "d":" npm i $package --no-bin-links && npm run postinstall",
    "test": "echo \"Error: no test specified\" && exit 1",
    "postinstall": "find node_modules/ -type l -exec rm {} +"
  }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM