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

ModuleNotFoundError on export #38

Open
j0no opened this issue Feb 27, 2023 · 1 comment
Open

ModuleNotFoundError on export #38

j0no opened this issue Feb 27, 2023 · 1 comment

Comments

@j0no
Copy link

j0no commented Feb 27, 2023

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

I kept getting the rolling error when trying to export web in expo.

Failed to compile
ModuleNotFoundError: Module not found: Error: Can't resolve './dist/abort-controller' in 'node_modules/abort-controller'
Did you mean 'abort-controller.mjs'?
BREAKING CHANGE: The request './dist/abort-controller' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

Node v16.17.1

Here is the diff that solved my problem:

diff --git a/node_modules/abort-controller/polyfill.mjs b/node_modules/abort-controller/polyfill.mjs
index 0602a64..cf581af 100644
--- a/node_modules/abort-controller/polyfill.mjs
+++ b/node_modules/abort-controller/polyfill.mjs
@@ -1,5 +1,5 @@
 /*globals self, window */
-import * as ac from "./dist/abort-controller"
+import * as ac from "./dist/abort-controller.mjs"
 
 /*eslint-disable @mysticatea/prettier */
 const g =

This issue body was partially generated by patch-package.

@zhangela
Copy link

Seeing the same issue! Any plans to fix this?

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

No branches or pull requests

2 participants