installed v5 following the @TechnicallyComputers guide.
Installation wasn’t smooth and the guide is missing some crucial steps, like php artisan key:generate and chmodding some folders etc.
But I managed to get to the point where I finally can see the setup page. And this is where I am stuck: InvoiceNinja does not see node and npm despite those being installed.
I assume the problem is:
[11:40:37] LOG.info: The command "PATH=$PATH:/usr/local/bin NODE_PATH=`npm root -g` node '/usr/share/nginx/invoiceninja/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"file:\/\/\/tmp\/209706731-0069307001595850037\/index.html","action":"pdf","options":{"path":"\/usr\/share\/nginx\/invoiceninja\/public\/test.pdf","args":[],"viewport":{"width":800,"height":600},"displayHeaderFooter":false}}'" failed.
Exit Code: 127(Command not found)
Working directory: /usr/share/nginx/invoiceninja/public
Output:
================
Error Output:
================
sh: npm: command not found
sh: node: command not found
It looks like it possible to manually set the paths, you may want to try setting NODE_PATH and NPM_PATH in the .env file and then clear the cache by running php artisan config:clear
following the given instructions, this is where those packages got installed.
Is there really any advantage in installing those via Node Version Manager (given the fact that InvoiceNinja is the only thing running on that server) rather that simply via yum?
Thank you, I will try to review and repost my guide with changes like not using version managers for anything, since they add extra complication, and the missed php artisan key:generate and generally review my steps more closely
@TechnicallyComputers I think that would be very desirable - I’d hazard a guess that vast majority of users won’t even need multiple versions of Node on their servers (as they might - like I did - just be using a small VPS that is dedicated for InvoiceNInja), so using NVM would make no sense.
If I may suggest / request something: try to aim that guide towards a fresh installation - that way people who had just spun up a new VPS will have all the tools and commands to make the InvoiceNinja work and the people who already have a CentOS running (probably with half of the packages already present) will just see that some packages are already installed.