I have a translations.ts
file located at project/src/services/translations.js
that exports the following array:
export const supportedLocales = ['en', 'es'];
And I am attempting to import it in generateStrings.mjs
file which is located at project/src/scripts/generateStrings.mjs
like this:
import { supportedLocales } from '../services/translations';
But I get an error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/User/Desktop/Projects/mobile/src/services/translations' imported from /Users/User/Desktop/Projects/mobile/src/scripts/generateStrings.mjs
My IDE couldn't automatically import the array either only in that specific file. I wonder if it is because the file has .mjs
extension?