0

I have project on express using typescript. When i try to use tsc to convert typescript files to js and create build folder, It's creating and everything is fine but when i try to start server in build folder am getting error SyntaxError: Cannot use import statement outside a module.

2
  • Please check your package.json if your "type" key is using the "module" value. Commented Jul 29, 2022 at 17:14
  • If i use that then i can't start it in locale "dev": "ts-node-dev --respawn src/index.ts"' Commented Jul 29, 2022 at 17:18

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.