Skip to content

getDevMiddleware crashes when reactNativePath is undefined #580

@tomhendra

Description

@tomhendra

Environment

OS: macOS 26.0
Node.js: v22.19.0
Package Manager: pnpm v10.17.0
Rock.js: 0.11.2

Description

The getDevMiddleware function in @callstack/repack crashes with TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined when reactNativePath parameter is undefined.

Patching the getDevMiddleware / pluginRepack to fallback to cwd seems to get the dev server running, although I am uncertain if this is a valid approach.

Edit: Happy to open a PR if a fallback to cwd is acceptable.

Reproducible Demo

pnpm create rock@latest
pnpm rock start

https://github.com/tomhendra/rock-issue

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