Testing out the new npm package v1.0.0 I found there was an issue importing the package using ES imports:
import CognitoSrpHelper from "cognito-srp-helper";
I receive the following error:
node:internal/errors:478
ErrorCaptureStackTrace(err);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/tmp/xuubar/node_modules/cognito-srp-helper/dist/esm/cognito-srp-helper' imported from /tmp/xuubar/node_modules/cognito-srp-helper/dist/esm/index.js
at new NodeError (node:internal/errors:387:5)
at finalizeResolution (node:internal/modules/esm/resolve:330:11)
at moduleResolve (node:internal/modules/esm/resolve:907:10)
at defaultResolve (node:internal/modules/esm/resolve:1115:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:837:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
This is likely because I'm not using .js file extensions on my imports. I'll need to update the ESLint config to enforce file extensions, then go through and update all the imports
Testing out the new npm package v1.0.0 I found there was an issue importing the package using ES imports:
I receive the following error:
This is likely because I'm not using
.js
file extensions on my imports. I'll need to update the ESLint config to enforce file extensions, then go through and update all the importsNPM version: 8.19.2 Node version: 16.18.1