jshttp / accepts

Higher-level content negotiation
MIT License
252 stars 39 forks source link

Cannot find module negotiator #29

Open gjethwani opened 4 months ago

gjethwani commented 4 months ago

Hi!

Reporting a bug. When I import express, it imports accepts which imports negotiator. However, it seems that version 1.3.8 of accepts cannot find the negotiator dependency. It has to be explicitly installed in the project. Some more details: Node version: 20.10.0 Express version: 4.17.0 Reverting to accepts 1.3.7 fixes the issue.

jonchurch commented 4 months ago

I can't repro this, purge your node_modules and reinstall to see if it persists. If you can create a repro then we can look at it but I don't think there should be any breakage here

gjethwani commented 4 months ago

I am able to repro it successfully after multiple attempts deleting node_modules and yarn.lock. I unfortunately am limited in how much code I can share due to this being corporate code, but I'm happy to provide any details you need to repro the issue

jonchurch commented 4 months ago

What version of yarn? Does it repro with npm install?

Can you do an npm ls or yarn list to dump your dep tree and share it?

Im still leaning that this is a dep resolution issue on your machine. We pin deps under the express family of orgs so the dep tree really doesnt shift around. But how it is reconciled in your project on your machine can always be a pleasant surprise!

But its just guessing unless you can create a minimal repro.