-
Notifications
You must be signed in to change notification settings - Fork 224
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
Rename files to cjs.js
for compatibility with React Native
#1085
Comments
cjs.js
for compatibility with React Native
@steveluscher interesting, I'd be down for a PR if you want to make this change! |
For sure. I would have done that in the moment, but I had too much mental stack to switch. If I get to it first, cool; if someone reading this wants to take a crack at it, cooler! |
PR'd. |
Hi everyone, thanks very much for addressing this! I was having this issue using solana/web3.js and stumbled upon this. I downloaded @steveluscher's branch and tested it out locally and it was able to build. |
Awesome! Let's shipit! |
Hi @steveluscher Thanks a lot in advance! |
@valentinmadrid the package needs to be built, it can't be cloned directly from git. not sure if this is the right way, but i used the same this seems to have worked but i immediately ran into other issues. i don't think they're related though. |
We'll just have to be patient! Once @ianstormtaylor mashes the merge button on #1086 and does a release, we should all be able to update to that new release from npm. |
Hi @ianstormtaylor, we have run into the same issue and really expect a new release of superstruct to address this. Thanks heaps! |
Guys any resolution, i'm facing exactly same error:
|
Thanks for this but i'm on |
I know! You’ll have to upgrade to 0.70+ for support going forward. We’ve abandoned the 0.69- line. |
Importing @solana/web3.js in React Native throws the following error.
You can see that the React Native packager expects a
.js
extension in addition to.cjs
If
superstruct
could rename the CommonJS bundles from.cjs
to.cjs.js
that would make it Just Work™ for React Native folks!More details on the problem here, if you're interested: facebook/metro#535
The text was updated successfully, but these errors were encountered: