Error [ERR_MODULE_NOT_FOUND]: Cannot find module

When you are using ECMAScript modules you are forced to provide the file extension: https://nodejs.org/api/esm.html#esm_mandatory_file_extensions

So, on top of what other suggested of using "type": "module" on package.json you also need to specify the file extension import {urls} from './helpers.js'.
You can also use the flag --es-module-specifier-resolution=node to make it resolve js files as modules just like it did before with require

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)