-
Notifications
You must be signed in to change notification settings - Fork 27k
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
unhandledRejection: Error: Cannot find module 'lru-cache' #65674
Comments
Do you mean that you used it without having it installed, aka in your package.json? If so, then just install it yourself, I see in the examples, an app that uses lru-cache, https://github.com/vercel/next.js/blob/fedb675520e0de8f360f8d2e262acdf76b4f0491/examples/api-routes-rate-limit/package.json, you should use it as such. I reckon that you got impacted by vendor-ing of the package. Next.js still has it, but as a compiled dependency, so that we, the users, don't need to download and reinstall it every time. However, that belongs to the internals of the framework, and you should not rely on that. Install the package on your project, and take it from there. |
Nextjs has an announcement space? Is there anything about update dependencies? If so, where should I follow them? |
I think, from a project point of view, you are over stepping your boundaries, if you want to rely on a transient dependency like that. Such packages are never part of the project's public API, and because of that, it is your sole responsibility to deal with the consequences of having done so. |
Hi -- if your project depends on |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
To Reproduce
Current vs. Expected behavior
I used to be able to use a library called "lru-cache" in my projects, but one day I couldn't use lru-cache. I would like to know if nextjs has removed this library and if it has been removed, should it be announced or not?
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure, Developer Experience, Documentation
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
I have to remove code related to "lru-cache" to be able to run the project. I would like to know how to fix this.
The text was updated successfully, but these errors were encountered: