Skip to content

[Bug] Cannot resolve npm package on macOS #3973

@brillout

Description

@brillout

Esbuild seems to fail to resolve vike-react/config for some macOS users. The weird thing is that it seems to only happen on macOS and only for some users. Also note that Node.js can resolve vike-react/config just fine even for these macOS users, so it seems to be an esbuild bug.

Note that vike-react/config resolves to the file ./dist/+config.js which contains a + character. Maybe it has something to do with that + character. (I cannot test because I don't have a macOS machine.)

This is fairly critical because it makes Vike unusable. (Although, as a workaround, Vike now falls back to using Node.js if esbuild fails to resolve, but I ain't sure how reliable that workaround is.)

Reproduction: https://github.com/brillout/esbuild-bug-macos-resolve
macOS version: 14.3.1 (see vikejs/vike#1729 (comment))
Original Vike issue: vikejs/vike#1729

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions