Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlink not resolving directory properly #1831

Open
3 tasks done
Chill-Sam opened this issue Nov 20, 2024 · 1 comment
Open
3 tasks done

Symlink not resolving directory properly #1831

Chill-Sam opened this issue Nov 20, 2024 · 1 comment

Comments

@Chill-Sam
Copy link

I've searched open issues for similar requests

  • Yes

I've manually reviewed logs to find potential errors

  • Yes

I've recently downloaded the latest plugin version of mason.nvim

  • Yes

Problem description

Mason creates a bin file at ~/.local/share/nvim/mason/bin/typescript-language-server
It runs the code basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')") to find the library cli.mjs.
This file is symlinked to ~/.local/share/nvim/mason/packages/typescript-language-server/node_modules/.bin/typescript-language-server that works properly when run directly. However when run through the symlink it cannot find the library due to basedir not resolving to the correct directory.

Expected behavior

The script should resolve the directory properly even when called through a symlink,

Steps to reproduce

  1. Install typescript-language-server through mason.
  2. Attempt to attach to buffer

Affected packages

typescript-language-server

Neovim version (>= 0.7)

NVIM v0.10.2
Build type: RelWithDebInfo
LuaJIT 2.1.1725453128

Operating system/version

Linux SW2411 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 GNU/Linux

Healthcheck

==============================================================================
mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.10.0
- OK PATH: prepend
- OK Providers: 
    mason.providers.registry-api
    mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2024-11-20-light-osmium` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send`
- OK wget: `GNU Wget 1.24.5 built on linux-gnu.`
- OK curl: `curl 8.10.1 (x86_64-pc-linux-gnu) libcurl/8.10.1 OpenSSL/3.3.2 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.63.0 nghttp3/1.6.0`
- OK gzip: `gzip 1.13`
- OK tar: `tar (GNU tar) 1.35`
- OK bash: `GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING Go: not available
  - ADVICE:
    - spawn: go failed with exit code - and signal -. go is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- WARNING Ruby: not available
  - ADVICE:
    - spawn: ruby failed with exit code - and signal -. ruby is not executable
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- WARNING java: not available
  - ADVICE:
    - spawn: java failed with exit code - and signal -. java is not executable
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- WARNING RubyGem: not available
  - ADVICE:
    - spawn: gem failed with exit code - and signal -. gem is not executable
- OK python: `Python 3.12.6`
- OK node: `v22.11.0`
- OK cargo: `cargo 1.81.0 (2dbb1af80 2024-08-20)`
- OK npm: `10.9.0`
- WARNING pip: not available
  - ADVICE:
    - spawn: python3 failed with exit code 1 and signal 0. /usr/sbin/python3: No module named pip
      
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Wed Nov 20 23:46:48 2024.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots or recordings

No response

@LasseKrarup
Copy link

See #1315
Does running which npm return the path to the Windows npm and not the WSL one?

If so, make sure you have npm installed inside of WSL and that which npm points to the version inside WSL. See Install Node.js on Windows Subsystem for Linux (WSL2)

Make sure to reinstall the typescript-language-server and other Mason packages that depend on node/npm afterwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants