Giter Club home page Giter Club logo

Comments (3)

ryanmoran avatar ryanmoran commented on August 9, 2024 1

I think a warning here is too subtle. Several users have already reported bugs that had this root issue. It gets reported as "the buildpack isn't updating my dependency" and then we discover that the package-lock.json was not updated. It causes confusion and results in invalid bug reports showing up here. I think it merits a build failure so that we can inform the user that their source is not validly configured.

from npm-install.

ForestEckhardt avatar ForestEckhardt commented on August 9, 2024

Would it be appropriate to just warn the user through build output that their app may be out of date. So we could take a checksum of package.json and if that changes between runs but we decide to reuse the layer we could print a message to the effect of The package.json has changed but node_module/npm-cache/package-lock.json has stayed the same this may result in unexpected behavior please regenerate those artifacts.?

from npm-install.

fg-j avatar fg-j commented on August 9, 2024

From what I can see of the npm-ci docs,

If dependencies in the package lock do not match those in package.json, npm ci will exit with an error, instead of updating the package lock.

So I think if the npm ci build process decided it should still run even if the package-lock.json is unchanged, we can get a nice error message for free. Unfortunately, with about a bit more logic, we lose the performance benefit of reusing a valid cached node_modules since

If a node_modules is already present, it will be automatically removed before npm ci begins its install.

from npm-install.

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.