coinbase / coinbase/onchainkit

Bug: Deployment failed in Vercel following MiniKit Tutorial

Open
#2,395 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1k
Forks
520
Avg merge
32m
Merged PRs (30d)
2

Description

### Describe the bug and the steps to reproduce it

1. Follow the steps from https://docs.base.org/builderkits/minikit/quickstart till "Deploying to Vercel" section.
2. Install Vercel CLI.
3. Try deploying the project with the command "vercel".
4. Vercel returns a build error:
```
x 'import', and 'export' cannot be used outside of module code
,-[48:1]
48 | self.addEventListener('beforeunload', () => {
49 | stopHeartbeat();
50 | });
51 | export {};
: ^^^^^^
52 | //# sourceMappingURL=HeartbeatWorker.js.map
`----
Caused by:
0: failed to parse input file
1: Syntax Error
> Build failed because of webpack errors
Error: Command "npm run build" exited with 1
```

### What's the expected behavior?

The miniapp should deploy correctly on Vercel, but the presence of `export {};` prevents it. The error originates from the module `@coinbase/wallet-sdk/dist/sign/walletlink/relay/connection/HeartbeatWorker.js`. I resolved the issue by simply removing the `export {};` statement, which allowed the build to succeed locally—previously, it failed both locally and on Vercel.

![Image](https://github.com/user-attachments/assets/c605ff44-e58f-4f83-80ba-9a5d79fb376c)

### What version of the libraries are you using?

- OnChainKit: 0.38.13

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.