Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
-
The following error appears next to the Application Startup File in Domains > example.com > Node.js:
The file does not exist
-
The NodeJS application doesn't work, the webbrowser shows following error on opening the website:
We're sorry, but something went wrong.
-
The following error is shown in log /var/log/passenger/passenger.log:
App 2286 output: Error: Cannot find module '/var/www/vhosts/example.com/sub.example.com/app.js'
Cause
Application Startup File is missing in the Application Root directory.
Resolution
-
Go to Domains > example.com > Node.js
-
Verify that the Application Root directory is set to an existing directory
-
Make sure that the Application Startup File exists in the Application Root directory and set the correct name by clicking on file name in Domains > example.com > Node.js next to Application Startup File and clicking OK
Comments
4 comments
Thank you for this info, but for the life of me I *still* can't find the app.js file. Plesk says it's installed, but I don't see any evidence of node in my domain. The 'file does not exist' notification is still next to the app.js in the Application Startup File row. Thoughts?
Hi Tre Stange,
This message means that there is no such file in the application root.
For example, there is no app.js file in /httpdocs/. However, if you create a file app.js in that same directory /httpdocs/, no error will be shown.
In case applications is using another startup file, for example server.js, you can just click on app.js and specify another startup file name.
npm WARN lifecycle npm is using /opt/plesk/node/12/bin/node but there is no node binary in the current PATH. Use the
--scripts-prepend-node-path
option to include the path for the node binary npm was executed with.sh: node: command not found
Hi Oscar!
The error that was mentioned in your screenshot was related to a different issue. Please, apply the solution described in the following KB article: https://support.plesk.com/hc/en-us/articles/360000644114
Please sign in to leave a comment.