PHP 8.0 build "error: attribute 'json' missing"

Eeprieto5/18/2023
My project ID c0821839-fe34-4bbb-8872-93446a76aec3, Its a CodeIgniter app with uuid is using PHP 8.1, railway build with 8.0 and its showing this error:

context: cb02218c96c8c58a2d28297cc916216d

╔═══════════════════════════════ Nixpacks v1.5.1 ══════════════════════════════╗
║ setup │ (php80.withExtensions (pe: pe.enabled ++ [pe.all.json ║
║ │ pe.all.mbstring pe.all.intl])), perl, nginx, libmysqlclient, ║
║ │ php80Packages.composer, php80Extensions.json, ║
║ │ php80Extensions.mbstring, php80Extensions.intl ║
║──────────────────────────────────────────────────────────────────────────────║
║ install │ mkdir -p /var/log/nginx && mkdir -p /var/cache/nginx ║
║ │ composer install --ignore-platform-reqs ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ php-fpm -y /assets/php-fpm.conf & nginx -c /app/nginx.conf ║
╚══════════════════════════════════════════════════════════════════════════════╝

...

#8 [4/9] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d

#8 22.63 installing '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847-env'

#8 23.05 error: attribute 'json' missing
#8 23.05
#8 23.05 at /app/.nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix:6:88:
#8 23.05
#8 23.05 5| let
#8 23.05 6| APPEND_LIBRARY_PATH = "${lib.makeLibraryPath [ libmysqlclient php80Extensions.intl php80Extensions.json php80Extensions.mbstring ] }";
#8 23.05 | ^
#8 23.05 7| myLibraries = writeText "libraries" ''
#8 23.05 (use '--show-trace' to show detailed location information)
Bbrody5/18/2023
railway supports php 8.0/8.1/8.2 with the default being 8.2 the version is detected from your composer.json file
Bbrody5/18/2023
check what version is set in your composer.json file
Eeprieto5/19/2023
Thanks @Brody, my composer has: "php": "^7.4 || ^8.0"
Bbrody5/19/2023
try pinning it to the specific version you want railway to use
Eeprieto5/19/2023
I try it before, but the setup of nixpack says that php80Extensions.json is enabled and later don't find it. With 8.1 was the same
Eeprieto5/19/2023
the problem start when I setup / as root
Eeprieto5/19/2023
there is a public and app folder
Eeprieto5/19/2023
if I setup the root at /public builds ok, but in the build only have the content of /public
Bbrody5/19/2023
@aleks - can you take over from here when you have some time?
Bbrody5/19/2023
^ he knows about php, I do not
Eeprieto5/19/2023
Thanks!
Bbrody5/19/2023
please wait patiently and he will come help when he has some free time
Eeprieto5/19/2023
Yes! Thanks again
Eeprieto5/19/2023
I will write a post on CodeIgniter Forum when we resolved this: Deploy to Railway in a few seconds
Rroot5/19/2023
Oh... is there a package called ext-json that you're requiring?
Rroot5/19/2023
Oh, never mind, I have misdiagnosed.
Rroot5/19/2023
Looks like this will require a change in Nixpacks, please hold.
Eeprieto5/19/2023
Thanks @aleks
Bbrody5/19/2023
11.3k line changes, wow
Bbrody5/19/2023
the team member that usually maintains nixpacks is on a little vacation right now, so we don't know when that will get merged, there's also other factors like the nixpacks version that aleks wants to merge into breaks some python apps, so it might be a while unfortunately
Rroot5/19/2023
I added another laravel example
Eeprieto5/20/2023
Hi guys! Without the json extesion build ok, I have some concerns: I need to change permissions to a folder to be writeable, and the other is I need to point the root of nginx to /public
Eeprieto5/20/2023
for nginx i copied the template but in the deployment console shows errors like nginx: [emerg] host not found in "${PORT}" of the "listen" directive in /app/nginx.conf:25