TypeError: Class extends value undefined is not a constructor or null - fs-minipass
emish89 opened this issue · comments
Problem
Short Version
In am on OSX. I use n with success from years. After installing node 20.2.0 I started getting a problem with npm and now I can only run npm if I downgrade to node 18.16.0.
Long Version
After installing with n node 20.2.0 (I was on 20.1.0), when I try using npm I get:
/usr/local/lib/node_modules/npm/lib/cli.js:35
throw err
^
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/fs-minipass/lib/index.js:136:4)
I tried reverting to 20.1.0, prune, change to another node 20, another node 19 but no luck.
I don't know how can I properly solve the problem, right now can only work downgrading to last node 18 that works fine.
Configuration Details
$ n --version
2.1.10
$ command -v node
/usr/local/bin/node
$ node -p process.platform
darwin
That is an old version of n
. Because of problems with npm
when changing Node.js version we now delete the npm
folder before copying in the new version. What was happening was pieces of a different version of npm were being left behind and causing problems. See #470 for more details.
Try upgrading n and trying again.
An answer was provided, and no further activity in a month. Closing this as resolved.
Feel free to open a new issue if it comes up again, with new information and renewed interest.