Coder Social home page Coder Social logo

Comments (5)

icyJoseph avatar icyJoseph commented on June 23, 2024

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.

from next.js.

champ6803 avatar champ6803 commented on June 23, 2024

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?

from next.js.

icyJoseph avatar icyJoseph commented on June 23, 2024

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.

from next.js.

ztanner avatar ztanner commented on June 23, 2024

Hi -- if your project depends on lru-cache, you should install it in your project. Next.js uses it internally, but as @icyJoseph mentioned, you should not rely on Next.js providing it. We have not removed this dependency from our internal usage, and without a link to a reproduction, we're not able to help debug further.

from next.js.

github-actions avatar github-actions commented on June 23, 2024

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.

from next.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.