Could Not Spawn Process: Difference between revisions
No edit summary |
m Update to use H2 headers for better readability |
||
(4 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
}} | }} | ||
= Could not spawn process for application /[your app path]: The application process exited prematurely. = | == Could not spawn process for application /[your app path]: The application process exited prematurely. == | ||
When running a Node app using Passenger, if you receive an error message that says: | When running a Node app using Passenger, if you receive an error message that says: | ||
'Could not spawn process for application /[your app path]: The application process exited prematurely. | |||
Error ID: ######## | Error ID: ######## | ||
Error details saved to: /tmp/passenger-error-######.html | Error details saved to: /tmp/passenger-error-######.html' | ||
This is caused by using import statements of | This is caused by using import statements of 'require()'. | ||
= How to Fix the Error = | == How to Fix the Error == | ||
To resolve the error, change your | To resolve the error, change your 'require()' statements to 'import()', as explained in [https://github.com/orgs/adonisjs/discussions/4364 the answer on this discussion]. | ||
= Troubleshooting Node / Passenger Issues = | == Troubleshooting Node / Passenger Issues == | ||
More detailed error reporting is available by setting the Passenger environment to | More detailed error reporting is available by setting the Passenger environment to 'Development'. | ||
[[File:node_error_in_dev_env.png]] | [[File:node_error_in_dev_env.png]] | ||
To change your environment to | To change your environment to 'Development' mode, navigate to: | ||
'''Login > Plesk > Websites & Domains > [domain] > Node.js''' | '''Login > Plesk > Websites & Domains > [domain] > Node.js''' | ||
Line 31: | Line 31: | ||
[[File:node-change-to-dev-env.png]] | [[File:node-change-to-dev-env.png]] | ||
In the | In the 'Development' environment, you will see the full error message: | ||
<pre> | <pre> | ||
Line 45: | Line 45: | ||
[[File:node_full_error_in_dev_env.png]] | [[File:node_full_error_in_dev_env.png]] | ||
= Further Support = | == Further Support == | ||
If after changing your imports to | If after changing your imports to 'require()' it still isn't working, please go back and check all of your steps again. If it still isn't working after you have changed all your import statements and [[:Clear_Your_Cache|cleared your browser cache]], please make a new post in the [https://helionet.org/index/forum/45-customer-service/?do==add Customer Service forum], making sure to provide your '''username''', '''domain name''', and details about the problem, including any '''error message(s)''' received. |
Latest revision as of 17:27, 17 January 2025
If you use Node.js, we strongly recommend that you monitor your site load here.
Node apps often require a lot of server resources, and exceeding the account load limits will cause your user account to be suspended for high server usage.
Could not spawn process for application /[your app path]: The application process exited prematurely.
When running a Node app using Passenger, if you receive an error message that says:
'Could not spawn process for application /[your app path]: The application process exited prematurely.
Error ID: ######## Error details saved to: /tmp/passenger-error-######.html'
This is caused by using import statements of 'require()'.
How to Fix the Error
To resolve the error, change your 'require()' statements to 'import()', as explained in the answer on this discussion.
Troubleshooting Node / Passenger Issues
More detailed error reporting is available by setting the Passenger environment to 'Development'.
To change your environment to 'Development' mode, navigate to:
Login > Plesk > Websites & Domains > [domain] > Node.js
In the 'Development' environment, you will see the full error message:
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/domain.helioho.st/subdomain.domain.helioho.st/index.js from /usr/share/passenger/helper-scripts/node-loader.js not supported. Instead change the require of index.js in /usr/share/passenger/helper-scripts/node-loader.js to a dynamic import() which is available in all CommonJS modules. at TracingChannel.traceSync (node:diagnostics_channel:315:14) at Module.require (/usr/share/passenger/helper-scripts/node-loader.js:80:25) at loadApplication (/usr/share/passenger/helper-scripts/node-loader.js:243:2) at setupEnvironment (/usr/share/passenger/helper-scripts/node-loader.js:214:2) code: 'ERR_REQUIRE_ESM'
Further Support
If after changing your imports to 'require()' it still isn't working, please go back and check all of your steps again. If it still isn't working after you have changed all your import statements and cleared your browser cache, please make a new post in the Customer Service forum, making sure to provide your username, domain name, and details about the problem, including any error message(s) received.