When you run this in the terminal does it return the expected versions?
/home/nil/.nvm/versions/node/v20.11.1/bin/node --version
/home/nil/.nvm/versions/node/v20.11.1/bin/npm --version
Hello everyone, So I am actually using Spatie's Laravel Pdf package, I have followed everything in the docs especially about the requirements. I have Node and Npm installed from Nvm.
When I try :
Browsershot::html('Foo')
->save('invoice.pdf');
It returns the Node and Npm error saying they are not found. So I tried both Binary method and Include path method :
Browsershot::html('Foo')
->setNodeBinary('/home/nil/.nvm/versions/node/v20.11.1/bin/node')
->setNpmBinary('/home/nil/.nvm/versions/node/v20.11.1/bin/npm')
->save('invoice.pdf');
and
Browsershot::html('Foo')
->setIncludePath('$PATH:/home/nil/.nvm/versions/node/v20.11.1/bin')
->save('invoice.pdf');
but I do still have the same error saying Node is not found. I have double checked the Path and saw that Node and Npm are there.
I am using Sail + WSL2.
Do you have any guides I could follow? Thank you so much
Please or to participate in this conversation.