The issue is because wkhtmltopdf wasn't installed on the right server. I need to install the package inside the nitro server by ssh into the root of the container.
Here is the steps,
nitro ssh --root
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.10/main/ wkhtmltopdf=0.12.
wkhtmltopdf=0.12.6-r0 is the version.
You might need ...
Was the value you got from which whtmlopdf $whtmlopdf? Return code 127 is
Value 127 is returned by /bin/sh when the given command is not found within your PATH system variable and it is not a built-in shell command. In other words, the system doesn't understand your command, because it doesn't know where to find the binary you're trying to call.