MetaMask / MetaMask/metamask-sdk
[Bug]: Installing @metamask/sdk-analytics causing import_openapi_fetch.default is not a function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 338
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
### SDK
Web
### Provide environment information
using react + webpack, trying to upgrade to web3auth/modal@10.0.2
### MetaMask SDK Version
0.33.0
### MetaMask Mobile app Version
n/a
### What browser are you using? (if relevant)
firefox
### How are you deploying your application? (if relevant)
_No response_
### Describe the Bug
Hi, im using web3auth/modal which in turn installs @metamask/sdk-analytics@0.0.5 , and -- openapi-fetch@0.13.8 but when my app starts, im getting:
```
import_openapi_fetch.default is not a function
Analytics@http://localhost:3000/static/js/bundle.js:29273:54
./node_modules/@metamask/sdk-analytics/dist/index.js@http://localhost:3000/static/js/bundle.js:29317:14
options.factory@http://localhost:3000/static/js/bundle.js:303500:30
__webpack_require__@http://localhost:3000/static/js/bundle.js:302855:32
```
can someone help?
### Expected Behavior
No errors
### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
_No response_
### To Reproduce
Using react and webpack, just install web3auth/modal@10.0.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the startup failure by installing web3auth/modal@10.0.2 in a React and webpack app, then inspect @metamask/sdk-analytics/dist/index.js and its openapi-fetch dependency. Confirm the package-loading behavior in Firefox and trace the import_openapi_fetch.default call. Done means the app starts without the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript, webpack
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100