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
The basic case for the global cli installations is currently not working. Steps to reproduce:
install Node using the official MSI (I tested with version 14 but seems to happen in other versions)
install cli globally: npm i -g @criticalmanufacturing/cli
set env variable or run with DEBUG=cmf:*
run cmf -h
No help menu is shown because the node shim that invokes the cli binary thinks it was installed locally and not globally.
This is due to a bug with sindresorhus/is-installed-globally. In this case, npm is installed inside %APPDATA% and not under the node prefix, which by default is C:\Program Files\nodejs but is-installed-globally does not account for this scenario.
A simple fix could be checking if the node shim is inside %APPDATA%.
The text was updated successfully, but these errors were encountered:
The basic case for the global cli installations is currently not working. Steps to reproduce:
npm i -g @criticalmanufacturing/cli
DEBUG=cmf:*
cmf -h
No help menu is shown because the node shim that invokes the cli binary thinks it was installed locally and not globally.
This is due to a bug with sindresorhus/is-installed-globally. In this case,
npm
is installed inside%APPDATA%
and not under the node prefix, which by default isC:\Program Files\nodejs
butis-installed-globally
does not account for this scenario.A simple fix could be checking if the node shim is inside
%APPDATA%
.The text was updated successfully, but these errors were encountered: