#Add TS project inside electronJS project

4 messages · Page 1 of 1 (latest)

quaint merlin
#

Hello, i need to implement my BE/NODE ts project on my electronJS project, is this doable? any concernes? the idea is to have a button that runs this project, how to archive it?

#

when i tsc the files and try to run with node i got an error
SyntaxError: Cannot use import statement outside a module
but if i use ts-node it's working fine

pine dove
#

In CJS you can only use require

#

to use import you either have to make your app ESM or use a bundler