-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npm link <package>: Cannot read properties of null (reading 'matches') #4367
Comments
When in the
Then in another application (not the aforementioned
Output redacted to retain only the relevant entries. Now I really wonder: why is there no
Which I know is exactly because of duplicate installations of The reason I share this is because: today strange things started happening that broke any understanding I thought I had about how |
It works fine in any other directory:
|
I figured out exactly what is needed to reproduce it, and as such how I could solve it - that is, it still seems like an issue with npm. Here is my package.json
If I remove |
You need to link every peer dep also - which means react also needs to be linked. |
Thanks for your input - if so, I suggest this issue stays open until npm returns a suitable error message on this error. Curiously, I could not find anything when searching for |
That error is indeed an npm bug. The react warning you see is because of the general concept that when linking, every peer dep must also be linked, so they’re not duplicated. |
Node: v17.4.0
|
Looks like we need a more sensible error here. |
Any solution? I'm experiencing this error across all dev machines. It's a showstopper. I'm running all the latest: npm: '8.6.0', node: '17.9.0' |
I've got the same problem on 18.1 / 8.8:
When running: |
I was having the same exact issue after I did
I deleted my |
I have the same problem as @JoshuaKemmerer with pnpm, hoping it will be fixed soon |
I was so unlucky (yesterday) that all the problems I encountered were officially unsolved...... |
For anyone interested. I had this issue as well, until I realised I needed to use So in my case I would use |
Yes, |
nestjs/nest-cli#1720 revelant |
|
I have a vite project with PNPM and React
Got this error:
Can someone help me finding what's missing for it to run correctly please? |
solved by |
I encounter this issue when I was using PNPM but need |
I also ran into the same issue, it seems that mv node_modules node_modules_foobar
npm install --package-lock-only
mv node_modules_foobar node_modules |
I have this issue when running...
...since I converted my application to pnpm. In the root package.json I've included local dependencies that seems to break these commands "dependencies": {
"lib": "workspace:*"
} I have no peerDependencies as mentioned above. Is this an pnpm issue or is it a npm issue? |
imc it worked after deleting node_modules and .cache |
For me was just deletion of |
actual error message is misleading
expected error message would be more helpful
|
@Ploppz also, in case you haven't figured this part out yet, npm should never be installed separately, it comes with node and should be upgraded with itself; and i suggest not using apt to install node. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Running
npm link react
in my library gives me the following output:And no link happens. The log:
Expected Behavior
No error, and symbolic link created in node_modules with name
react
Steps To Reproduce
I have
npm
installed from official Arch repo.I have an app called
ui
. I went into itsnode_modules/react
afternpm i
and ransudo npm link
. As such, a symbolic link was created called/usr/lib/node_modules/react
which points to this directory:I have a shared library called
components
in which I need to link to this react installation, so I runnpm link react
in there and get the above problem.npm link react
worked fine yesterday with the same setup, and it still work perfectly fine in a second application I'm developing with the samecomponents
library... It's just in the components library itself it won't work.Note that also the
components
library itself is linked withsudo npm link
Environment
The text was updated successfully, but these errors were encountered: