Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js firebase nodejs中的ghostscript4js:/usr/lib/x86_64-linux-gnu/libgs.so:没有这样的文件或目录_Node.js_Firebase - Fatal编程技术网

Node.js firebase nodejs中的ghostscript4js:/usr/lib/x86_64-linux-gnu/libgs.so:没有这样的文件或目录

Node.js firebase nodejs中的ghostscript4js:/usr/lib/x86_64-linux-gnu/libgs.so:没有这样的文件或目录,node.js,firebase,Node.js,Firebase,我正在尝试将此软件包安装到firebase函数: 所以我跑: 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/no

我正在尝试将此软件包安装到firebase函数:

所以我跑:

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时,它会崩溃,出现
错误:/usr/lib/x86_64-linux-gnu/libgs.so:没有这样的文件或目录

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安装ghostscript js
过程中失败了


有没有关于我在这里遗漏了什么和做错了什么的信息?

问题显然是需要将底层ghostscript安装到节点环境中-ghostscript4js只是一个包装器

我放弃了ghostscript4js,并在安装ghostscript后开始直接使用它

这里还有关于我如何在我的案例中安装它的链接(我使用的是firebase节点),如果这对任何人都有帮助的话:

不同的节点环境可能需要不同的步骤来安装它