Comments (6)
This is working as expected since we merged paketo-buildpacks/npm-start#179. Can you explain why you expect this to work without specifying a start command?
from npm-install.
Some of the NodeJS apps we build use Procfiles or are started with custom docker start commands rather than using a package.json start command. The build looks like it will work as the node-engine and procfie buildpacks both match, but the deps are not installed so the app fails to start.
===> DETECTING
4 of 8 buildpacks participating
paketo-buildpacks/ca-certificates 3.1.0
paketo-buildpacks/node-engine 0.12.1
paketo-buildpacks/node-start 0.7.1
paketo-buildpacks/procfile 5.1.0
I've added an example on this branch
It is also a bit strange how the npm behaviour does not match the yarn behaviour
from npm-install.
+1 on this, and yes @ryanmoran it was caused by the PR you referenced, but not intended (@dalbar is a colleague of me). We also just stumbled over that the npm-start buildpack requests nodemodules. And now as it does not participate anymore, it does not request it anymore and npm-install does not jump in.
I think, conceptually it would make sense to decouple this. npm-install should imo always contribute if there is a package.json which has a non-empty dependencies or devDependencies section (depending on NODE_ENV). By default only for runtime. node-run-script would request it for build time as it does today.
Not sure what the best way is to get to this behavior.
from npm-install.
+1 on this, and yes @ryanmoran it was caused by the PR you referenced, but not intended (@dalbar is a colleague of me). We also just stumbled over that the npm-start buildpack requests nodemodules. And now as it does not participate anymore, it does not request it anymore and npm-install does not jump in.
I think, conceptually it would make sense to decouple this. npm-install should imo always contribute if there is a package.json which has a non-empty dependencies or devDependencies section (depending on NODE_ENV). By default only for runtime. node-run-script would request it for build time as it does today.
Not sure what the best way is to get to this behavior.
@ryanmoran Wouldn't it be sufficient to add an additional build group in https://github.com/paketo-buildpacks/nodejs/blob/main/buildpack.toml that install npm dependencies and runs node-start with a lower priority than the current npm-start group.
Currently the build groups are: yarn stuff, npm-install+npm-start and node-start.
With changes: yarn stuff, npm-install+npm-start, npm-install+node-start and node-start.
Ordered groups should lead to the desired behavior.
from npm-install.
This PR (paketo-buildpacks/node-start#203) will allow the node-start
buildpack to pull in node_modules
if needed. Once this lands, we can add node-start
to both the yarn
and npm
order groups in the node
buildpack.toml
. We can then also make their respective *-start
buildpacks optional. At this point, I believe we will have restored the original behavior.
@dalbar I'd also love to see a PR to yarn-start
that replicates the behavior that we have today in npm-start
with regard to the detection of the start command.
from npm-install.
@ryanmoran sounds like a solid plan. I will work on the yarn-start
changes.
from npm-install.
Related Issues (20)
- 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
- Failure: Publish draft releases
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.