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