You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Native doesn't like .cjs, so it gives this error:
Android Bundling failed 334ms
While trying to resolve module `@joebobmiles/y-react` from file `/Users/.../App.tsx`, the package `/Users/.../node_modules/@joebobmiles/y-react/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/Users/.../node_modules/@joebobmiles/y-react/dist/y-react.cjs`. Indeed, none of these files exist:
* /Users/.../node_modules/@joebobmiles/y-react/dist/y-react.cjs(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
An extra build output in rollup.config.js could resolve this.
The text was updated successfully, but these errors were encountered:
Reviewing this while I'm not trying to fall asleep and doing a little research, it seems that React Native is expecting main to point to a non-compiled file (i.e. not cjs or mjs). It appears this is a known issue that Metro contributors are too busy/lazy to fix, since its two years old at this point and they closed 56 issues and 141 PRs in that time.
That being said, there are two workarounds, one being posted last night. I am going to close this issue and ask that you bother the Metro folks.
React Native doesn't like .cjs, so it gives this error:
An extra build output in rollup.config.js could resolve this.
The text was updated successfully, but these errors were encountered: