fnm
fnm copied to clipboard
In Git Bash on Windows, I get a "node not recognized" error, but ONLY in postinstall scripts
I've been trying to debug this for a while, and haven't been able to figure it out.
FNM works fine, all the time, if I run scripts, or automate scripts, or run it from the Git Bash Windows command line.
However, if an installed package has a postinstall
script, and THAT script references node
, then it throws an error: 'node' is not recognized as an internal or external command, operable program or batch file
.
I can't figure out a circumstance where Node is available when installing, but not to a package. Any ideas?
Btw, I'm definitely running eval "$(fnm env --use-on-cd)"
and, like I said, I can use node
if I run it myself, but packages can't.
Did you add the path corresponding to environment variable FNM_DIR(check it by running 'fnm env') to PATH?