Error: EACCES: permission denied, open ‘tree-sitter‘
Posted 红桃xin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Error: EACCES: permission denied, open ‘tree-sitter‘相关的知识,希望对你有一定的参考价值。
npm安装没有权限
you could try adding
npm i -g bash-language-server --unsafe-perm=true --allow-root
报错日志:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/tree-sitter/.node-gyp'
gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/tree-sitter
gyp ERR! node -v v14.17.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tree-sitter@0.19.0 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tree-sitter@0.19.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-09-03T03_52_17_361Z-debug.log
[root@gaohongtao-7320 installer]# npm install -g tree-sitter --unsafe-perm=true --allow-root
编译时 提示make cc Command not found
yum install gcc
以上是关于Error: EACCES: permission denied, open ‘tree-sitter‘的主要内容,如果未能解决你的问题,请参考以下文章
Error: EACCES: permission denied, open ‘tree-sitter‘
Error: EACCES: permission denied, open ‘tree-sitter‘
npm permission denied错误npm ERR! Error: EACCES: permission denied, access
Error: listen EACCES: permission denied 0.0.0.0:80
Unhandled rejection Error: EACCES: permission denied, open '