Comments (4)
Hi @SaschaSchwarze0, thanks for bringing this to our attention. For now, it seems to be a problem in the
node-engine
buildpack's build logic. If this is blocking you as we continue to evaluate this issue, you should be able to get around it by running the samepack
command with the addition of the--clear-cache
option.
Thanks for checking and confirming. Workaround is known. But given we do not always know what we rebuild, we at the moment turn caching off always - not necessarily efficient. ;-) So looking forward for a fix - also to learn how it is done to get a better understanding of that area. :-)
from node-engine.
Hi @SaschaSchwarze0, thanks for bringing this to our attention. For now, it seems to be a problem in the node-engine
buildpack's build logic. If this is blocking you as we continue to evaluate this issue, you should be able to get around it by running the same pack
command with the addition of the --clear-cache
option.
from node-engine.
After taking a look at this today, I've isolated the issue. When building without a package.json
, the order group that is applied is the following:
paketo-buildpacks/node-engine
paketo-buildpacks/node-start
In this case, the node-start
buildpack is what is requiring node
into the build context. However, it does this by only specifying launch = true
in its build plan requirement. The node-engine
buildpack thus installs node
, but only marks the launch = true
flag which results in a situation where the restorer doesn't repopulate the contents of the layer on subsequent builds. This is expected and aligns with the buildpack specification. For applications that never introduce a package.json
file into their codebase, this is fine because the node
layer is never needed until run-time.
However, when switching to using a package.json
, we suddenly have a build-time requirement for the node
layer that did not previously exist. In this situation, the node-engine
buildpack reuses the cache, which won't include the contents of the layer (as described above), and therefore results in npm
or really any of the node
layer executables being reported as missing when invoked during the remainder of the build process.
The solution here is that the node-engine
buildpack needs to be a bit smarter when it is choosing to reuse the cached layer. If the current build plan requires node
during build, we need to check to see if the layer contents are restored and then only reuse the layer if it exists.
from node-engine.
I can still reproduce this with the latest builder using
[detector] 5 of 11 buildpacks participating
[detector] paketo-buildpacks/ca-certificates 3.5.1
[detector] paketo-buildpacks/node-engine 1.2.1
[detector] paketo-buildpacks/npm-install 1.0.3
[detector] paketo-buildpacks/node-start 1.0.3
[detector] paketo-buildpacks/npm-start 1.0.3
from node-engine.
Related Issues (20)
- Implement RFC0044: Disable SBOM
- Failure: Create Draft Release workflow HOT 1
- Support for Jammy Jellyfish
- Failure: Create Draft Release workflow HOT 2
- Failure: Create Draft Release workflow HOT 16
- Implement Dependency RFC 0004 for node HOT 2
- Remove buildpack.yml support for 1.0 release
- Compile dependency on actual stack images
- Failure: Update Dependencies workflow HOT 7
- Buildpack should resolve or ignore lts channels in nvmrc detection HOT 1
- Failure: Update Dependencies workflow HOT 71
- Failure: Go get update workflow HOT 1
- Integration tests can not run after running go test -count=1 -timeout 0 ./integration/... -v -run Integration HOT 3
- Add Node 20, Remove 14?
- Failure: Approve bot PR workflow HOT 9
- Implement RFC0037: Enable Remote Debug Support HOT 1
- When Paketobot updates stacks, it should default to `*` HOT 2
- ./scripts/build.sh is failing HOT 1
- Ability to specify which npm version to use HOT 1
- Failure: Publish draft releases HOT 2
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 node-engine.