This is an old thread and we’ve since made changes which mean this approach doesn’t work unless you run enable-npm
from the command line to use the npm package manager. Note though that doing that will mean your node modules will begin to use up project disk space so you’ll likely to run out of space.
If you want to do it with pnpm, our default package manager, it’s a little more complicated - this post provides a good overview of how to do it: Default Node-red flow and pnpm