tracker icon indicating copy to clipboard operation
tracker copied to clipboard

NodeJS app doesn't work as documented

Open JedMeister opened this issue 9 months ago • 0 comments

As Tom points out on the forums, the NodeJS appliance isn't configured as the appliance page says it is. There is a link to the guide there too (and in Tom's post).

As i replied to Tom, it should be how it says it is!

In the meantime, here is a workaround:

su node
mkdir "${HOME}/.npm-packages"
npm config set prefix "${HOME}/.npm-packages"
cat > "${HOME}/.bashrc.d/node" <<'EOF'
NPM_PACKAGES="${HOME}/.npm-packages"

export PATH="$PATH:$NPM_PACKAGES/bin"

# Preserve MANPATH if you already defined it somewhere in your config.
# Otherwise, fall back to `manpath` so we can inherit from `/etc/manpath`.
export MANPATH="${MANPATH-$(manpath)}:$NPM_PACKAGES/share/man"
EOF
chmod +x "${HOME}/.bashrc.d/node"
source "${HOME}/.bashrc.d/node"

JedMeister avatar May 07 '24 07:05 JedMeister