Skip to content
Discussion options

You must be logged in to vote

Rename the sever.js to server.ts

Update tsconfig.json
https://www.totaltypescript.com/concepts/option-module-must-be-set-to-nodenext-when-option-moduleresolution-is-set-to-nodenext

{
    "module": "NodeNext",
    "moduleResolution": "Bundler",
}

Install tsx package

npm install tsx

Update package.json

  "scripts": {
    "dev": "remix dev --manual -c \"tsx ./server.ts\"",
    "start": "cross-env NODE_ENV=production tsx ./server.ts",
  },

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@noiseymur
Comment options

@rajprashanthr
Comment options

Answer selected by noiseymur
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants