Open arthabus opened 4 years ago
Hi @arthabus,
I don't know firebase, but I think that the problem is that in your production environment you don't have the ghostscript installed. The installation process try to link the ghostscript library using the default path /usr/lib/x86_64-linux-gnu/libgs.so
.
You can use two environment variables:
/usr/lib/x86_64-linux-gnu/
libgs.so
In your deployment process the best thing is to set the two environment variables if necessary and then start the installation of modules for your application:
export GS4JS_HOME=/usr/lib/x86_64-linux-gnu/ && \
export GS4JS_LIB=libgs.so && \
npm install
Obviously you need to have ghostscript installed on your production environment.
@NickNaso thanks. Yes, I guess the problem is that it's not installed.
And sorry for the dumb question but how do I install ghostscript to node?
Till today I was only using node with npm - this is how I installed any needed modules so far. Any articles or how to google it would be very helpful ("install new modules to node" or similar returns "use npm"). I know I'm missing something fundamental here...
Hi @arthabus,
sorry for the late in response to you. To allow you to easily use ghostscript4js on serverless environment I need to make all the tasks that I discussed here: https://github.com/NickNaso/ghostscript4js/issues/55#issuecomment-610359219
Maybe a simple workaround could be to build ghostscript library and put it on ta folder inside of your project then you can set the environment variables GS4JS_HOME
e GS4JS_LIB
to point to that folder and file library. At that point all should work well. I think that you need to build the library for Linux.
Hi,
I'm getting this error when I try to deploy to firebase nodejs - any input on what I'm missing is much appreciated:
I was trying to override --GS4JS_HOME but then it fails during the
npm install ghostscript-js
.