Skip to content

Preinstall not called before try to install and collect packages information #4914

Closed
@alexander-schranz

Description

@alexander-schranz

What version of Bun is running?

1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a79

What platform is your computer?

Darwin 21.6.0 arm64 arm

What steps can reproduce the bug?

If you are using local dependencies which are only available after calling preinstall bun will fail.

e.g.:

    "scripts": {
        "preinstall": "node ./preinstall.js",
        "postinstall": "node ./postinstall.js"
    },
    "dependencies": {
        "local-package-available-after-preinstall": "file:../some/local/path"
    }

What is the expected behavior?

First call the preinstall script before try todo the install.

What do you see instead?

bun install v1.0.0 (822a00c4)


error: MissingPackageJSON


note: error occured while resolving local-package-...
error: FileNotFound installing local-package-...

Additional information

Following works:

bun run preinstall
bun install

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions