Fabian H
Basic Pleskian
Using the node.js extension, the node server (port bound with express) cannot start as it seems.
The /var/log/httpd/error_log is giving this error:
The file /tmp/passenger-error-ioV4eJ.html does not exist anyway.
I try running with cli (/opt/plesk/node/17/bin/node server.js), there are no errors on startup, so modules seems to be installed correctly.
The /var/log/httpd/error_log is giving this error:
Code:
App 1168143 output: /usr/share/passenger/helper-scripts/node-loader.js:80
App 1168143 output: return originalRequire.apply(this, arguments);
App 1168143 output: ^
App 1168143 output:
App 1168143 output: Error [ERR_REQUIRE_ESM]: require() of ES Module /var/www/vhosts/sitemap-finder.com/httpdocs/server.js from /usr/share/passenger/helper-scripts/node-loader.js not supported.
App 1168143 output: Instead change the require of server.js in /usr/share/passenger/helper-scripts/node-loader.js to a dynamic import() which is available in all CommonJS modules.
App 1168143 output: at Module.require (/usr/share/passenger/helper-scripts/node-loader.js:80:25)
App 1168143 output: at loadApplication (/usr/share/passenger/helper-scripts/node-loader.js:243:2)
App 1168143 output: at setupEnvironment (/usr/share/passenger/helper-scripts/node-loader.js:214:2)
App 1168143 output: at Object.<anonymous> (/usr/share/passenger/helper-scripts/node-loader.js:133:1) {
App 1168143 output: code: 'ERR_REQUIRE_ESM'
App 1168143 output: }
App 1168143 output:
App 1168143 output: Node.js v17.3.0
[ E 2021-12-23 11:44:24.1727 1166900/T1n age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/vhosts/sitemap-finder.com/httpdocs: The application process exited prematurely.
Error ID: aff98d91
Error details saved to: /tmp/passenger-error-qXrxkJ.html
[ E 2021-12-23 11:44:24.1772 1166900/T9 age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 1-3] Cannot checkout session because a spawning error occurred. The identifier of the error is aff98d91. Please see earlier logs for details about the error.
The file /tmp/passenger-error-ioV4eJ.html does not exist anyway.
I try running with cli (/opt/plesk/node/17/bin/node server.js), there are no errors on startup, so modules seems to be installed correctly.