Closed briva closed 6 years ago
Hi @briva ,
before the execution of npm install
try to install node-gyp globally as reported below:
npm install -g node-gyp
Hope that this will work for you.
Nick
Just added that but i got this when i build the docker container :
Removing intermediate container 586fa9f2a459 Step 12/18 : RUN npm install ghostscript4js --save ---> Running in a49c000b74b4
ghostscript4js@2.0.7 install /node_modules/ghostscript4js node-gyp rebuild
make: Entering directory '/node_modules/ghostscript4js/build' CXX(target) Release/obj.target/ghostscript4js/src/ghostscript4js.o SOLINK_MODULE(target) Release/obj.target/ghostscript4js.node COPY Release/ghostscript4js.node make: Leaving directory '/node_modules/ghostscript4js/build' npm WARN saveError ENOENT: no such file or directory, open '/package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open '/package.json' npm WARN !invalid#1 No description npm WARN !invalid#1 No repository field. npm WARN !invalid#1 No README data npm WARN !invalid#1 No license field.
Still the same issue :
node dist
/data/node_modules/bindings/bindings.js:88 throw e ^
Error: /data/node_modules/ghostscript4js/build/Release/ghostscript4js.node: invalid ELF header at Object.Module._extensions..node (module.js:670:18) at Module.load (module.js:560:32) at tryModuleLoad (module.js:503:12) at Function.Module._load (module.js:495:3) at Module.require (module.js:585:17) at require (internal/module.js:11:18) at bindings (/data/node_modules/bindings/bindings.js:81:44) at Object.
(/data/node_modules/ghostscript4js/lib/ghostscript4js.js:25:31) at Module._compile (module.js:641:30) at Object.Module._extensions..js (module.js:652:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! express-es6-rest-api@0.3.0 start: node dist
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the express-es6-rest-api@0.3.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@briva Sorry if I didn't update this issue, but now there's a guide on documentation to use the module with docker. See: https://github.com/NickNaso/ghostscript4js#docker Now I will provide to close the issue, but feel free to reopen if you have other problems.
This is my docker file :
I got this message when i launch the container.
node dist
I try the install in a clean Ubuntu VM and i didnt get this message. It works well.