You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to start the server in a Vite Typescript environment. I've looked at this discussion and the project it refers to. I tried setting things up to compile my server.ts into js and run from there, but then I get this error when I run node -r esm build/server/server.js:
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/nathan/projects/new-vite/build/server/server.js not supported.
Instead change the require of server.js in null to a dynamic import() which is available in all CommonJS modules.] {
code: 'ERR_REQUIRE_ESM'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to start the server in a Vite Typescript environment. I've looked at this discussion and the project it refers to. I tried setting things up to compile my server.ts into js and run from there, but then I get this error when I run
node -r esm build/server/server.js
:How can I fix this?
Beta Was this translation helpful? Give feedback.
All reactions