Skip to content

Preinstall still not aborted in dependencies when using NPM #13

@neolitec

Description

@neolitec

Description

I would like to re-open #2 because the fix doesn't work for me.

I'm on OSX and process.cwd() === /Users/neolitec/.npm/_cacache/tmp/git-clone-15806b2b no matter if I use npm 6, 7, or 8.

process.cwd() doesn't contain node_modules so the package is not detected as a dependency (for which we don't want to check the PM) but actually as the root project.

It works for yarn and pnpm because they don't even seem to trigger the preinstall scripts from the dependencies for some reason.

Reproduction

You can reproduce by creating a new project using NPM and try npm i neolitec/repro-pnpm-project.

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