Skip to content

Bug: Deployment failed in Vercel following MiniKit Tutorial #2395

@viccmoor

Description

@viccmoor

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

What version of the libraries are you using?

  • OnChainKit: 0.38.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions