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
"ERR_INVALID_THIS" on "pnpm up" in Node 20 #6424
"ERR_INVALID_THIS" on "pnpm up" in Node 20 #6424
Comments
There are other issues like this, it seems:
|
The original issue seems to be thrown by |
I updated to node v20 last night using
and faced similar issues but the problem is now I cannot even go back to node v19 or v18
gives
|
In my case pnpm works fine with previous node version (v19.8.1). Only when I try to use node v20, it throws
I use NVM to change to switch. |
Can confirm this only seems to happen on the latest node 20 and using a previous version (19.9.0 in my case) it works fine. Getting: |
Confirm, same problem on updating to node 20 with asdf and pnpm 8.3.0 Stack trace on running
when reverting to node 19 with asdf and pnpm 8.1 no problems occur |
We'll switch to a fork of node-fetch with a fix. Here's the fix: pnpm/node-fetch#1 |
Fixed in v8.3.1 |
To help anyone else using pnpm globally installed by pnpm: npx pnpm i -g pnpm@latest |
why don't you use native 'fetch'? So wouldn't you be avoiding problems like this in the future? |
This patches node-fetch so pnpm install works on Node 20: pnpm/pnpm#6424
This doesn't appear to be fully fixed unless I'm missing something- I''m running on a Mac and have updated to the latest but it still persists. -- hold that thought, IntelliJ is giving me a different version than outside. Probably my issue. UPDATE: fixed. The version pulled by npx is not up to date. On a Mac I had to upgrade via home-brew and use it to override symlinks. |
native fetch is not present in node.js v16. And even in node.js v18 it is experimental. So, we cannot use it. |
On 18 it's not behind a flag, at least. So we can make that PR in September when 16 is EOL? |
It would be a breaking change. I don't know when the next major will be released. |
I'm still facing this issue with pnpm@8.14.2 and Node@20, it worked fine after downgrading to Node@18. |
This bug is most certainly fixed. You should verify that you're actually using that pnpm version and that something is not being overridden in your environment, e.g. by corepack or similar. |
@jakebailey yes, you're correct. it was getting overridden by corepack :) |
Getting this error on pnpm install with node 20... pnpm/pnpm#6424
* fix: add pnpm install to IDE publish script (#213) * fix: specific version of pnpm install Getting this error on pnpm install with node 20... pnpm/pnpm#6424 * chore: update pnpm, update to node 20, remove ide narrat deps * chore: trying to get the tauri action CI to find the right config * chore: still trying to fix CI * chore: ... * chore: ...
pnpm 8.2.0 has issue which prevents to install dependencies: “ WARN GET https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.” See also: pnpm/pnpm#6424
FWIW, as a first time user of I followed a link to the pnpm installation page to install I choose to use
Then I run I find this issue and check my I switched back to Since at one point, I used corepack to update pnpm to the latest, and that didn't work, I consider this to still be a bug. Of course, now that I got to a point where /edit: I figured out my issue in case anyone is interested... I had installed node via |
Don't forget to update the version in your
|
You can use |
PNPM (<= 8.3.1) is not compatible with Node.js 20 pnpm/pnpm#6424
This is still happening specifically when using act using node 20, either with an image with node20 or using node setup action before pnpm. I know ACT isn't necessarily something pnpm has reason to specially investigate, but it seems something about docker, node20 and pnpm is an issue. This is the case with the 9 alpha as well. What I've mostly done is use node18 images, and have pnpm manage and use node20, but it's extremely strange. Not even sure where an investigation would start, but just want whomever to know that this is an issue that exists, even if outside the scope of PNPM to resolve. |
Still happening, with pnpm v8.15.3 and node v20.11.0 |
This fixed it for me! Thanks |
Hi, This problem does not exist when I use npm instead of pnpm. |
My problem was that I was using the pnpm provided via homebrew. Check via:
If it is |
No, for me it's |
….jsonでのpnpmのバージョンアップ [参考Issue](pnpm/pnpm#6424) まだテストしてない、マージしてコンフリクト解消しただけ
This was the solutions for me updated the packagesManager into "pnpm@8.3.1" |
Still happen with pnpm 9.0.6 and node v20.11.1 |
pnpm version: 8.3.0
Code to reproduce the issue:
In a pnpm project, install, then run
pnpm up
.An easy repro is just to try it in the pnpm repo itself.
Expected behavior:
No error
Actual behavior:
Additional information:
node -v
prints: v20.0.0The text was updated successfully, but these errors were encountered: