Comments (4)
Hi @pablos-here
I believe it's not related and strongly advise to avoid installing npm packages as privileged user.
You can change this behavior with something like this:
npm config set prefix=$HOME/.npm
Now you install every npm package without sudo
and it's placed in your home directory. To make binaries available on your command line you need to append this to your ~/.profile
or ~/.bashrc
and start new terminal session:
PATH="$HOME/.npm/bin:$PATH"
from awk-language-server.
I believe it's not related
Hi @Beaglefoot ,
Would you please elaborate why it's not related?
and strongly advise to avoid installing npm packages as privileged user.
I appreciate the warning.
from awk-language-server.
Would you please elaborate why it's not related?
Well, this whole cli thing works because of this:
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#bin
First of all typescript files are compiled to js in out
dir and there is no executable bit:
$ stat -c %A out/cli.js
-rw-r--r--
Then js files are published as npm package and aforementioned bin
rule is applied.
On installation what's available on PATH
is just a symbolic link:
# stat -c "%N" $(which awk-language-server)
'/usr/local/bin/awk-language-server' -> '../lib/node_modules/awk-language-server/out/cli.js'
And the real js file has executable bit set for all users:
# stat -L -c "%A %N" $(which awk-language-server)
-rwxr-xr-x '/usr/local/bin/awk-language-server'
If your result is different then probably some other rules are applied by your system or configuration. I would suggest to check with docker.
from awk-language-server.
Hi @Beaglefoot ,
Thank you for the information. I appreciate it.
I've installed several[1] other npm
-based language servers and they all set the execution bit on the source file. The exception is awk-language-server
Given the above, it would suggest that the issue is with the packaging rather than my environment.
Have you tested installing awk-language-server
globally?
If it helps any, I'm on a rolling distro (openSUSE Tumbleweed). Assuming you've tested it globally and it works, perhaps there's an issue looming.
Thx!
References
- bash-language-server
- jslint
- pyright
- vscode-css-language-server
- vscode-eslint-language-server
- vscode-html-language-server
- vscode-json-language-server
- vscode-markdown-language-server
from awk-language-server.
Related Issues (20)
- Validate that next and nextfile are unavailable inside BEGIN/END rule
- Symbols are not updated on file renames, deletions and creation HOT 2
- Indexing fails if workspace contains directory with no access to
- Add --noIndex option for CLI mode
- Add support for AWKPATH env variable
- Add namespaces support
- npm install fails HOT 2
- Language server won't start due to invalid url HOT 2
- Formatter cannot be initialized from a directory with space character HOT 1
- Incorrect code highlight with cursor on comment
- Incompatibility with node v19.0.0 HOT 1
- Multidimensional array index is not recognized HOT 1
- Where snippets are defined?
- snip not work HOT 4
- Enhance automatically generated snippets HOT 5
- RangeError: Maximum call stack size exceeded HOT 1
- Error when running "npm update -g" HOT 4
- using [[:space:]] cause the IDE to point out a syntax error HOT 2
- Add installation for helix HOT 1
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 awk-language-server.