Skip to content

vinext start fails with ERR_MODULE_NOT_FOUND for Yoga WASM (next/og) #642

@NathanDrake2406

Description

@NathanDrake2406

Summary

vinext build + vinext start crashes at startup when the app uses ImageResponse from next/og.

Error

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'a' imported from
  /path/to/dist/server/assets/yoga-sbSbVeWy.wasm

Context

The Yoga WASM file (used by Satori for OG image generation) is emitted into dist/server/assets/ during build, but contains a minified import reference ('a') that wasn't resolved during bundling. Node can't resolve it at runtime.

The app imports ImageResponse from next/og in several opengraph-image.tsx files.

Steps

  1. Add an opengraph-image.tsx that uses ImageResponse from next/og
  2. vinext build
  3. vinext start
  4. Crashes immediately with the above error

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