You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
While this shims node, npm and npx to use the current project/global version. The binaries installed after an npm install are not shimmed. The correct bins are still accessible via npx, but that's not as intuitive as just running eslint directly.
Describe the solution you'd like
npm install eslint installs eslint using the current project version npm
which eslint points to the eslint in the correct npm bin path
Launch a new shell
which eslint should still be shimmed to the correct bin based on current project version
Describe alternatives you've considered
Shim all binaries post npm installation.
After the shimmed node binaries run, check the current version npm bin -g and add a shim for any new npm installed binaries that would handle redirecting to the correct version based on the current project.
Maybe include an environment variable NVSHIM_AUTO_INSTALL_SHIM=1 that controls if globally installed bins should have specific shims created
When a global shim does not exist for the current version of node what is the behaviour? Print warning and instructions?
Attempting to call global `eslint` but it is not installed for`node` v16.2.1.
Run `npm -g install eslint` to install for your current version.
Or switch your `nvm` config to a version that has it installed.
Available local node versions are `18.9.0`, `16.2.1`, `14.7.1`.
Configure the PATH to include npm binaries.
After nvshim is installed, configure the shell to set up dynamic environment PATH. Although at this point how is it different from the other solutions that modify the shell on directory change.
Is your feature request related to a problem? Please describe.
While this shims
node
,npm
andnpx
to use the current project/global version. The binaries installed after annpm install
are not shimmed. The correct bins are still accessible vianpx
, but that's not as intuitive as just runningeslint
directly.Describe the solution you'd like
npm install eslint
installs eslint using the current project version npmwhich eslint
points to the eslint in the correct npm bin pathwhich eslint
should still be shimmed to the correct bin based on current project versionDescribe alternatives you've considered
Shim all binaries post npm installation.
After the shimmed node binaries run, check the current version
npm bin -g
and add a shim for any new npm installed binaries that would handle redirecting to the correct version based on the current project.NVSHIM_AUTO_INSTALL_SHIM=1
that controls if globally installed bins should have specific shims createdConfigure the PATH to include npm binaries.
After
nvshim
is installed, configure the shell to set up dynamic environment PATH. Although at this point how is it different from the other solutions that modify the shell on directory change.Do nothing.
npx
is sufficient, just document that this is not within the scope of the project.Additional context
nvshim
tool alongsideavn
nvm-sh/nvm#2193 (comment)The text was updated successfully, but these errors were encountered: