10 months ago
hey, I need some extra files to install dependencies, how can I do that using Railpack? Here is what I tried:
{
"$schema": "https://schema.railpack.com",
"steps": {
"install": {
"inputs": [{ "local": true, "include": ["apps/docs/content"] }]
}
}
}I'm getting Install inputs must be an image or step input
29 Replies
10 months ago
004e54e7-64a6-467d-960d-379e6d29e925
10 months ago
feels more like an XY problem here, can you provide the error you get without any custom railpack config, then we can go from there
10 months ago
the error I get without railpack is an error from my application telling that it can't find a requested file
10 months ago
postinstall is a script that runs automatically (by pnpm/npm) when it finishes installing deps
10 months ago
I even added some ls to make sure that it's doing that.

10 months ago
what service in what env?
10 months ago
3b4c9a2d-f743-41e0-934e-fadffbf44c61
10 months ago
i assume this works on nixpacks?
10 months ago
yeah the install command works
10 months ago
but im guessing that nixpacks includes the entire app code
10 months ago
then i think i should tag in jr to give the advice here
10 months ago
railpack does not to improve the stage cache hit and that makes sense IMO
10 months ago
@jr - when you have a moment, could you give a look into this
link for ref:
10 months ago
What does your package.json look like? There is some logic in Railpack to include all the source files if postinstall is detected so ideally you don't have to have any config in this case. Oh it looks like a monorepo?
10 months ago
This should work for you though (note the "…" to indicate that you want to append to the existing install inputs)
{
"$schema": "https://schema.railpack.com",
"steps": {
"install": {
"inputs": ["...", { "local": true, "include": ["apps/docs/content"] }]
}
}
}10 months ago
im using turborepo, maybe it only checks on the package.json at root?
10 months ago
the postinstall is at an app
10 months ago
ah yeah that will do it. Railpack can check that. I'll make a note to add that
10 months ago
it looks like you got it working?
10 months ago
i'll try that config you sent me
10 months ago
pro tip: if you are debugging a railpack config file, you can expand the "Successfully prepare…" build log to see the full build plan that was generated

10 months ago
you can also likely use
{
"$schema": "https://schema.railpack.com",
"steps": {
"install": {
"commands": [{"src": "apps/docs/content", "dest": "apps/docs/content" }, "..."]
}
}
}10 months ago
or also just add a "postinstall": "echo noop" to the root package.json until it is fixed in railpack
10 months ago
thanks now it went through! im getting another error but now thats my code's fault 😭
10 months ago
unfortunatley railpack can't fix that yet :/
but glad the build is working better. if you have any other feedback about the railpack xp or config file please let us know in this thread
10 months ago
and btw, maybe the error should be better than "Install inputs must be an image or step input".
I had no idea that I had to include the default inputs
10 months ago
very good point
10 months ago
the config side of things is still a bit up in the air (hence the warning at the top of the build). Trying to balance low level control to optimize image size and build speed, with high level convience
10 months ago
!s
Status changed to Solved brody • 10 months ago