Я пытаюсь установить этот пакет для своих функций firebase: https://www.npmjs.com/package/ghostscript-js
Итак, я запускаю:
npm install ghostscript-js
И он отлично устанавливается:
> ghostscript4js@3.2.1 install /Users/user/Work/MyApp/functions/node_modules/ghostscript4js
> node-gyp rebuild
CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
LIBTOOL-STATIC Release/nothing.a
CXX(target) Release/obj.target/ghostscript4js/src/ghostscript4js.o
SOLINK_MODULE(target) Release/ghostscript4js.node
+ ghostscript4js@3.2.1
added 4 packages from 57 contributors and audited 14412 packages in 7.161s
Но когда я развертываю его в firebase, он падает с error: /usr/lib/x86_64-linux-gnu/libgs.so: No such file or directory
:
firebase deploy
Журнал консоли:
Deployment error.
Build failed:
{
"error": {
"canonicalCode": "INVALID_ARGUMENT",
"errorMessage": "`npm_install` had stderr output:
node-pre-gyp WARN
Using request for node-pre-gyp https download
g++: error: /usr/lib/x86_64-linux-gnu/libgs.so: No such file or directory
make: *** [Release/obj.target/ghostscript4js.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-1044-gcp
gyp ERR! command \"/usr/bin/node\" \"/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /workspace/node_modules/ghostscript4js
gyp ERR! node -v v8.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ghostscript4js@3.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ghostscript4js@3.2.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /builder/home/.npm/_logs/2020-03-09T10_06_18_268Z-debug.log
error: `npm_install` returned code: 1",
"errorType": "InternalError",
"errorId": "F8BCC123"
}
}
Я пытался переопределить - GS4JS_HOME, но затем он терпит неудачу во время npm install ghostscript-js
.
Любые входные данные о том, что я пропускаю и делаю здесь неправильно?