framework
framework copied to clipboard
Cannot Deploy to Node.js Selector Cpanel Server
Environment
- Operating System:
Linux - Node Version:
v14.18.3 - Nuxt Version:
3.0.0-rc.4 - Package Manager:
unknown - Builder:
vite - User Config:
- - Runtime Modules:
- - Build Modules:
-
Reproduction
I can check later, but I'm pretty sure this would happen with a starter Nuxt build
Describe the bug
When I try to start up on a CPanel server it fails, saying Must use import to load ES Module. Is there an option/do I need to build the CJS for the server bundle?
Additional context
No response
Logs
internal/modules/cjs/loader.js:948
throw new ERR_REQUIRE_ESM(filename);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/{user}/{project}/server/index.mjs
at new NodeError (internal/errors.js:322:7)
at Module.load (internal/modules/cjs/loader.js:948:11)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at startApplication (/usr/local/lsws/fcgi-bin/lsnode.js:48:15)
at Object.<anonymous> (/usr/local/lsws/fcgi-bin/lsnode.js:16:1)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32) {
code: 'ERR_REQUIRE_ESM'
}
Would you provide a reproduction please? 🙏
Hello, I have this issue with plesk (Phusion Passenger)...
@Eliophot Without reproduction this is unlikely to move on.