a year 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
a year ago
004e54e7-64a6-467d-960d-379e6d29e925
a year 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
a year ago
the error I get without railpack is an error from my application telling that it can't find a requested file
a year ago
postinstall is a script that runs automatically (by pnpm/npm) when it finishes installing deps
a year ago
I even added some ls to make sure that it's doing that.

a year ago
what service in what env?
a year ago
3b4c9a2d-f743-41e0-934e-fadffbf44c61
a year ago
i assume this works on nixpacks?
a year ago
yeah the install command works
a year ago
but im guessing that nixpacks includes the entire app code
a year ago
then i think i should tag in jr to give the advice here
a year ago
railpack does not to improve the stage cache hit and that makes sense IMO
a year ago
@jr - when you have a moment, could you give a look into this
link for ref:
a year 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?
a year 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"] }]
}
}
}a year ago
im using turborepo, maybe it only checks on the package.json at root?
a year ago
the postinstall is at an app
a year ago
ah yeah that will do it. Railpack can check that. I'll make a note to add that
a year ago
it looks like you got it working?
a year ago
i'll try that config you sent me
a year 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

a year ago
you can also likely use
{
"$schema": "https://schema.railpack.com",
"steps": {
"install": {
"commands": [{"src": "apps/docs/content", "dest": "apps/docs/content" }, "..."]
}
}
}a year ago
or also just add a "postinstall": "echo noop" to the root package.json until it is fixed in railpack
a year ago
thanks now it went through! im getting another error but now thats my code's fault 😭
a year 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
a year 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
a year ago
very good point
a year 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
a year ago
!s
Status changed to Solved brody • 12 months ago