NickNaso / ghostscript4js

Ghostscript4JS binds the Ghostscript C API to the Node.JS world.
http://www.nacios.it
Apache License 2.0
66 stars 19 forks source link

Install on MacOS 10.14.6 fails with #56

Open tvr3000 opened 4 years ago

tvr3000 commented 4 years ago

Install on MacOS 10.14.6 fails. I have tried reinstalling ghostscript, installed node-gyp, Mac OSX developertools, but I can't get it to work. Any suggestions would be welcome....

npm install ghostscript4js fails with the following errors

> node-gyp rebuild

  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
Traceback (most recent call last):
  File "./gyp-mac-tool", line 611, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./gyp-mac-tool", line 30, in main
    exit_code = executor.Dispatch(args)
  File "./gyp-mac-tool", line 45, in Dispatch
    return getattr(self, method)(*args[1:])
  File "./gyp-mac-tool", line 248, in ExecFilterLibtool
    if not libtool_re.match(line) and not libtool_re5.match(line):
TypeError: cannot use a string pattern on a bytes-like object
make: *** [Release/nothing.a] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/Oscar/.nvm/versions/node/v11.2.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/Users/tvr/.nvm/versions/node/v11.2.0/bin/node" "/Users/tvr/.nvm/versions/node/v11.2.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/tvr/loopback/KAM-pdf-viewer/pdfserver/node_modules/ghostscript4js
gyp ERR! node -v v11.2.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN vue-clickaway@2.2.2 requires a peer of vue@^2.0.0 but none is installed. You must install peer dependencies yourself.

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.
Tschuss69 commented 3 years ago

Did you find a solution ? I have the same problem

frbuceta commented 3 years ago

If you install ghostscript on the OS the problem disappears. I have solved it like this

mason-smith commented 2 years ago

Not 100% pertinent to MacOS 10.14.6, but if anybody else comes across this, you may also want to check your current Python version. I updated my OS (Monterey 12.3) a few months ago which removed Python 2.7 so I had to manually reinstall the correct version which got me up and running again.