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

Web-based build commands fail because of AsyncStorage #2

Open
ramyareye opened this issue Sep 11, 2021 · 4 comments
Open

Web-based build commands fail because of AsyncStorage #2

ramyareye opened this issue Sep 11, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@ramyareye
Copy link

Hello, thanks for you great work :)

I got this error on build web

~: yarn web:build
yarn run v1.22.10
$ yarn workspace @rnup/web build
$ craco build
Creating an optimized production build...
Failed to compile.

./node_modules/@react-native-async-storage/async-storage/lib/module/AsyncStorage.js
Attempted import error: 'merge-options' does not contain a default export (imported as 'mergeOptions').


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/local/Cellar/node/16.4.2/bin/node
Arguments: /usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js build
Directory: /Users/***/react-native-universal-monorepo/packages/web
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
~:
@mmazzarolo
Copy link
Owner

Hey @ramyareye , thanks for reporting!
I'm able to reproduce the issue as well... looks weird, because it's happening only in the production bundle 🤔
I'm wondering if it's related to this recent release: react-native-async-storage/async-storage#657

@mmazzarolo
Copy link
Owner

Yeah, older versions of async-storage seem to work fine.
I'm a bit busy writing a blog post about this repo, but once I'm done I can investigate further 👍 (Unless someone else wanna tackle it first)

@mmazzarolo mmazzarolo changed the title yarn web:build failed! Web-based build commands fail because of AsyncStorage Sep 12, 2021
@mmazzarolo mmazzarolo added the bug Something isn't working label Sep 12, 2021
@bart-vandervliet
Copy link

Any update on this? I'm currently experiencing this in a production build on yarn 1.22.18.

yarn run v1.22.18
$ node scripts/build.js
Creating an optimized production build...
Failed to compile.

./node_modules/@react-native-async-storage/async-storage/lib/module/AsyncStorage.js
Attempted import error: 'merge-options' does not contain a default export (imported as 'mergeOptions').


error Command failed with exit code 1.

@anodynos
Copy link

Has anyone found a workaround on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants