-
I have a working installation on my Mac, but when trying to run the pdf creation process on AlmaLinux 8, I get this error: The command "PATH=$PATH:/usr/local/bin:/opt/homebrew/bin NODE_PATH= The strange thing is that when I run this command on the Linux terminal with the same user as the server, it works. I get a stream of PDF back in the terminal: PATH=$PATH:/usr/local/bin:/opt/homebrew/bin NODE_PATH= Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
check your node installation with |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, nothing worked. I tried setting the node and npm paths to the 'which node' and 'which npm' paths, I also tried disabling the firewall, but nothing worked. At all times the command from the terminal seemed to work, but the browser responded with the same error message that I posted above. |
Beta Was this translation helpful? Give feedback.
-
I have exactly the same issue. I can not count how often I reinstalled and added multiple dependancies. It is also the same here: When I copy/paste the command from the error message and run it directly from the terminal, the command runs fine. The exact same command does not work when initiated by laravel. |
Beta Was this translation helpful? Give feedback.
-
I too have this issue. Can't for the life of me figure out how to fix it. I've tried almost everything it feels. |
Beta Was this translation helpful? Give feedback.
-
So, I managed to "fix" my issue. Maybe others have the same problem. I am running Laravel on Open Lite Speed. |
Beta Was this translation helpful? Give feedback.
So, I managed to "fix" my issue. Maybe others have the same problem. I am running Laravel on Open Lite Speed.
First of all I tried to launch puppeteer's chrome directly from laravel to check if the issue is related to puppeteer or to chrome. That failed, so I knew it was no problem of the package.
Then I found this post https://www.litespeedtech.com/support/forum/threads/chrome-headless-crashes-with-cannot-allocate-memory-error.21545/
So I just did exactly what this guy did and increased the memory limit for lsphp to 80G (even though the server only has 16) and since then it is working just fine.