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

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

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