Any relative imported files throws error in Crawlee
Any relative imported files throws error in Crawlee
At a glance
The community member is experiencing an issue with their TypeScript build, where relative import paths are throwing errors when using --moduleResolution set to node16 or nodenext. Specifically, importing a constants.ts file from a main.ts file in the same directory is causing an error.
In the comments, another community member has provided a solution, stating that they "had to add .js to all the imports.. even tho they are .ts files" to make the builds work again.
Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '../../types.js'?
any files that is imported throws an error when building. For instance, in my main.ts file if there is a constants.ts file in the same dir, import const from './contants throws an error in build and in typescript warning in IDE
Is there something I can do to make my builds work again? Thanks