簡體   English   中英

Termux - npm 錯誤! 錯誤:EPERM:不允許操作

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

在 Termux (Android) 上運行 npm install 時出現這些錯誤。 有什么解決辦法嗎?

在 Termux (Android) 上運行 npm install 時出現這些錯誤。 有什么解決辦法嗎?

$ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"android","arch":"arm64"})

npm ERR! path ../@babel/parser/bin/babel-parser.js
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall symlink
npm ERR! Error: EPERM: operation not permitted, symlink '../@babel/parser/bin/babel-parser.js' -> '/storage/emulated/0/web/tbcians/node_modules/.bin/parser'
npm ERR!  { [OperationalError: EPERM: operation not permitted, symlink '../@babel/parser/bin/babel-parser.js' -> '/storage/emulated/0/web/tbcians/node_modules/.bin/parser']
npm ERR!   cause:
npm ERR!    { [Error: EPERM: operation not permitted, symlink '../@babel/parser/bin/babel-parser.js' -> '/storage/emulated/0/web/tbcians/node_modules/.bin/parser']
npm ERR!      errno: -1,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'symlink',
npm ERR!      path: '../@babel/parser/bin/babel-parser.js',
npm ERR!      dest: '/storage/emulated/0/web/tbcians/node_modules/.bin/parser' },
npm ERR!   stack:
npm ERR!    "Error: EPERM: operation not permitted, symlink '../@babel/parser/bin/babel-parser.js' -> '/storage/emulated/0/web/tbcians/node_modules/.bin/parser'",
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../@babel/parser/bin/babel-parser.js',
npm ERR!   dest: '/storage/emulated/0/web/tbcians/node_modules/.bin/parser' }
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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/data/com.termux/files/home/.npm/_logs/2019-04-21T09_30_40_780Z-debug.log
$

Android 不允許符號鏈接存在於內部共享存儲中,只需將目錄web從內部存儲移動到位於數據分區中的 Termux 主目錄,即可解決您的錯誤。 為此,只需使用命令mv -r /sdcard/web ~ 請注意,這會將名為web的目錄移動到/data/data/com.termux/files/home/web

或者您可以將整個項目移動到 termux 主目錄

暫無
暫無

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

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