Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package postinstall step fails when spawning new node process #32

Open
TrevorBurnham opened this issue Dec 10, 2021 · 2 comments
Open

Comments

@TrevorBurnham
Copy link
Contributor

Output when running ./pnpm install in a project with [email protected]:

node_modules/.pnpm/[email protected]/node_modules/core-js-pure: Running postinstall script, failed in 935ms
.../node_modules/core-js-pure postinstall$ node -e "try{require('./postinstall')}catch(e){}"
│ No HNVM_NODE version set. Please set a Node version.
└─ Failed in 936ms

The error occurs when the package is running this postinstall step defined in its package.json.

@SpencerWhitehead7
Copy link

@TrevorBurnham
Copy link
Contributor Author

Per discussion in that thread, this issue is only occurring with pnpm >= 6.23.0, which made this change:

The path to the node executable that executes pnpm should not be added to the PATH, when running scripts.

Adding scripts-prepend-node-path=true to the project's .npmrc restores the more hnvm-friendly behavior that we had with older pnpm versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants