Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MODULE_NOT_FOUND error #7

Closed
snnbotchway opened this issue Feb 9, 2024 · 1 comment · Fixed by #8
Closed

MODULE_NOT_FOUND error #7

snnbotchway opened this issue Feb 9, 2024 · 1 comment · Fixed by #8

Comments

@snnbotchway
Copy link

In your package.json, you keep referencing dist/index.cjs. However, it doesn't exist, so I keep getting MODULE_NOT_FOUND:

Error: Cannot find module '/opt/app/node_modules/ethers-decode-error/dist/index.cjs'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:1181:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:1169:15)
at resolveExports (node:internal/modules/cjs/loader:591:14)
at Function.Module._findPath (node:internal/modules/cjs/loader:668:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/opt/app/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at Function.Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (/opt/app/src/index.ts:14:1) {
code: 'MODULE_NOT_FOUND',
path: '/opt/app/node_modules/ethers-decode-error/package.json'
}

I don't fully understand what's going on. This is the only code I've written with the package:

const errorDecoder = ErrorDecoder.create([interface])
@superical superical linked a pull request Feb 9, 2024 that will close this issue
@superical superical reopened this Feb 9, 2024
@superical
Copy link
Owner

@snnbotchway Thanks for highlighting this issue! I think I may have overlooked the commonjs import and missed the typo in the extension name. I have just released a new fix for this. I have tested it and I have no problem importing it now. Can you update your package to 2.1.3 and see if your error goes away?🙇‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants