Comments (6)
This is a node configuration issue.
Do this to fix it:
cd ~ && mkdir .node_modules_global && npm config set prefix=$HOME/.node_modules_global && npm config set prefix=$HOME/.node_modules_global
It's generally discouraged to install extensions outside the home directory, the above one liner changes the global path from
/usr
to
/home/user/.node_modules_global
You can then install bash-language-server using npm install bash-language-server --global
from bash-language-server.
@EvanWashkow You shouldn't need to install it with sudo
- what happens if you don't use sudo?
from bash-language-server.
@mads-hartmann So, I tried that as well (and I ran it again, just to see the output).
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
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! /home/evan/.npm/_logs/2018-06-12T22_07_13_648Z-debug.log
Here's that debug.log mentioned:
2018-06-12T22_07_13_648Z-debug.log
from bash-language-server.
^ And, that's why I thought I needed to run as sudo
, since it's trying to install those node modules in the /usr/lib/node_modules
directory: which is root-only.
from bash-language-server.
@EvanWashkow It's a bit hard to debug these thing remotely - can you see if this guide helps you? 😊https://docs.npmjs.com/getting-started/fixing-npm-permissions
from bash-language-server.
Okay. Thank you.
from bash-language-server.
Related Issues (20)
- Parser breaks on more than 2 pipes in a loop HOT 1
- Command-line flags are not autocompleted correctly.
- Deprecation Warning with Node.js Versions Above 20.11.1 in bash-language-server HOT 4
- GoToDefinition forces functions to be defined before, even if incorrect
- No information available for variables defined via mapfile, readarray or read
- Messy encoding between GBK and UTF8 on Windows 10 HOT 2
- Bash expression with arithmetic operations causing syntax error in bash-language-server HOT 1
- `'textDocument/rename'` does not include variable references in `(( ))` (arithmetic) HOT 1
- shellcheck's directive for shell is not working HOT 1
- Bash IDE VsCode Extension not being updated HOT 3
- Code snippet for `case` is invalid HOT 1
- The npm package has not updated HOT 1
- [question] how do I set --indent for shfmt HOT 2
- Formatting files using shfmt results in an empty file when shfmt can't parse the file
- pnpm compile failed HOT 1
- local variables which are defined & re-assigned in a function are shown to be accessible globally
- Do not trigger heredoc functionality within bash Arithmetic expansion with left shift operator
- Autocomplete environment variables HOT 1
- The GUI application was launched unexpectedly by the VSCode Bash IDE during string completion HOT 2
- Update pnpm-lock to address CVE issues
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bash-language-server.