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
corepack is not preserved, thus installed node16 reverts me back to corepack@0.10.0 every time.
Short Version
corepack should be preserved when npm is getting preserved
Long Version
When --preserve or N_PRESERVE_NPM=1 are given npm is preserved, but corepack should also be preserved in that case. Alternatively a N_PRESERVE_COREPACK env variable would be acceptable.
My ideal outcome is that none of the globally installed packages should be touched at all by switching node versions as this possibly hinders my workflow.
Configuration Details
$ n --version
v8.2.0
$ command -v node
/home/mitsu/.local/bin/node # as intended using a symlink to $N_PREFIX/bin/node
$ node -p process.platform
linux # Fedora 36 KDE Spin# .bashrcexport XDG_CONFIG_HOME="$HOME/.config"export XDG_CACHE_HOME="$HOME/.cache"export XDG_DATA_HOME="$HOME/.local/share"export XDG_STATE_HOME="$HOME/.local/state"export N_PREFIX="$XDG_DATA_HOME/node"export N_CACHE_PREFIX="$XDG_CACHE_HOME"export N_PRESERVE_NPM=1
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"export NODE_REPL_HISTORY="$XDG_STATE_HOME/node_repl/history"
The text was updated successfully, but these errors were encountered:
Mitsunee
changed the title
Feature Request: Preserve corepack with N_PRESERVE_NPM is 1
Feature Request: Preserve corepack with --preserve (or env variable)
Jul 3, 2022
I did wonder about how to treat corepack when it was added. I decided at the time that it was an additional part of the Node.js install and not part of npm as such.
Problem
corepack is not preserved, thus installed node16 reverts me back to
corepack@0.10.0
every time.Short Version
corepack should be preserved when npm is getting preserved
Long Version
When
--preserve
orN_PRESERVE_NPM=1
are given npm is preserved, but corepack should also be preserved in that case. Alternatively aN_PRESERVE_COREPACK
env variable would be acceptable.My ideal outcome is that none of the globally installed packages should be touched at all by switching node versions as this possibly hinders my workflow.
Configuration Details
The text was updated successfully, but these errors were encountered: