Symptoms
-
Unable to run npm run dev command under the Plesk system user, the process fails with the following error message:
# opt/plesk/node/21/bin/npm run dev
> npm run development
nodenv: npm: command not found
The `npm' command exists in these Node versions:
14
16
18
20
21 -
While running the command
nodenv local
from the same system user terminal the following is shown:# nodenv local
nodenv: no local version configured for this directory
Cause
The local Node JS version is not configured within the directory of Node application.
Resolution
-
Log into the server via SSH.
-
Switch to the affected system user account for example
johndoe
:# sudo su johndoe
-
Switch to the directory with Node application:
# cd /var/www/vhosts/example.com/httpdocs/
-
Configure the desired local Node JS version on this example as
21
with:# nodenv local 21
Comments
0 comments
Please sign in to leave a comment.