I'm currently trying to install my first Node.JS app through the user inteface and getting the following error message:
After some searching It seems to be an issue with Node.JS. I used version 14.4 to make this app, and the latest version available through the ui is 12.9.
I'd like to know if there is a way to update it through the CLI or other means. I have tried:
1. to include "node":"14.4.0" in my package.json file,
2. added "type": "module" to package.json
3. attempted to get to node to run -i through the ssh access and terminal.
Thanks.
David
Code:
App 1328642 output: internal/modules/cjs/loader.js:981
App 1328642 output: throw new ERR_REQUIRE_ESM(filename);
App 1328642 output: ^
App 1328642 output:
App 1328642 output: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/davidha1/apps/comment-system/app.mjs
App 1328642 output: at Object.Module._extensions..mjs (internal/modules/cjs/loader.js:981:9)
App 1328642 output: at Module.load (internal/modules/cjs/loader.js:790:32)
App 1328642 output: at Function.Module._load (internal/modules/cjs/loader.js:703:12)
App 1328642 output: at Module.require (internal/modules/cjs/loader.js:830:19)
App 1328642 output: at Module.require (/opt/passenger-5.3.7-9.el7.cloudlinux/src/helper-scripts/node-loader.js:80:25)
App 1328642 output: at require (internal/modules/cjs/helpers.js:68:18)
App 1328642 output: at loadApplication (/opt/passenger-5.3.7-9.el7.cloudlinux/src/helper-scripts/node-loader.js:243:2)
App 1328642 output: at setupEnvironment (/opt/passenger-5.3.7-9.el7.cloudlinux/src/helper-scripts/node-loader.js:214:2)
App 1328642 output: at Object.<anonymous> (/opt/passenger-5.3.7-9.el7.cloudlinux/src/helper-scripts/node-loader.js:133:1)
App 1328642 output: at Module._compile (internal/modules/cjs/loader.js:936:30)
I'd like to know if there is a way to update it through the CLI or other means. I have tried:
1. to include "node":"14.4.0" in my package.json file,
2. added "type": "module" to package.json
3. attempted to get to node to run -i through the ssh access and terminal.
Thanks.
David