Comments (3)
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.
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.
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)
- Implement RFC0044: Disable SBOM
- Different run-image and build-image users causing runtime failure HOT 2
- Failure: Create Draft Release workflow HOT 1
- Chmod fails when running as non-root user HOT 3
- Support Jammy Jellyfish
- A project with cached dependencies fails to start on subsequent builds HOT 2
- Failure: Create Draft Release workflow HOT 50
- Restarting o Docker Container results in errors executing the symlink script.
- Enable Debug Logging
- Build fails when `npm-cache` is supplied beforehand
- Failure: Go get update workflow HOT 3
- /tmp/node_modules directory is missing during run time HOT 5
- Project with a linked module fails with "Module not found" HOT 1
- build fails when using npm workspaces and `node_modules` is required during build and launch HOT 6
- Failure: Approve bot PR workflow HOT 1
- Locally installed packages not loading on container start
- Failure: Update GitHub config workflow
- Anchore Go Library - Vulnerabilities
- npm install is not installing devDependencies HOT 2
- Always overriding NODE_ENV with development HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-install.