Node internalBinding('errors').triggerUncaughtException error and '.js' extension

I converted an old project to use 'import' instead of 'require', and updated all the NPM packages, and added "type: module" to the package.json file. However, when I try to run I get the following error:

internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\username\Web\sender\sender\src\settings\settings' imported from C:\username\Web\sender\sender\src\services\files\initiate.service.js
    at new NodeError (internal/errors.js:322:7)
    at finalizeResolution (internal/modules/esm/resolve.js:308:11)
    at moduleResolve (internal/modules/esm/resolve.js:731:10)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:842:11)
    at Loader.resolve (internal/modules/esm/loader.js:89:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
    at link (internal/modules/esm/module_job.js:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}
npm ERR! code 1
npm ERR! path C:\username\Web\sender\sender
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node src/scripts/initiate.script.js

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\username\AppData\Local\npm-cache\_logs\2021-10-24T17_57_19_607Z-debug.log

When I added '.js' the problem was solved, however, I don't think this is the correct way to solve this issue. Is there any other way to overcome this error without adding '.js' to all of my imports?

Thanks.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum