Describe the question
I ran the example application according to the following page.
https://web3auth.io/docs/guides/firebase
I was able to run yarn start
without any problems
But when I run yarn build
I get the following error
$ yarn build
yarn run v1.22.19
$ react-app-rewired build
Creating an optimized production build…
Failed to compile.
Module not found: Error: Can’t resolve ‘@solana/web3.js’ in ‘/home/snaka/projects/web3auth/examples/web-core-sdk/custom-authentication/ firebase-react-core-example/node_modules/@web3auth/solana-provider/dist’
I would like to know the correct way to handle this issue.
Steps to Reproduce
- clone repos :
git clone https://github.com/Web3Auth/examples.git
- move directory:
cd web-core-sdk/custom-authentication/firebase-react-core-example
- install dependencies:
yarn
- build:
yarn build
- The error mentioned above occurs.
Expected behavior:
Build succeeds.
Platform Details
- Operating System: Windows (WSL2 - Ubuntu 20.04.4 LTS)
- Platform used: Web
- SDK used: Web
- Browser Chrome
- Web3Auth Version 4.0.0
Additional context
Actually, we are seeing the same issue in our product.
We have checked our product and the version of @web3auth/core
and @web3auth/openlogin-adapter
up to v3.3.0 is fine.
It seems that this problem occurs when the version is upgraded to v4.x.
I have stopped updating web3auth related packages because of this problem.
As the error message indicates, adding @solana/web3.js
as a dependency of our product will solve the problem.
However, we do not use solana in our product.
Therefore, adding @solana/web3.js
to our dependencies does not seem to be the right way to handle this.
I would like to know the correct way to handle this issue.
Originally posted by: snaka
Check the discussion at: https://github.com/orgs/Web3Auth/discussions/1212