node-printer
node-printer copied to clipboard
this thing fails to install, no matter what I try
npm-debug.log OS X Mojave, just installed the latest XCode, tried with node v6.X and node v11.x, this thing just keeps failing.... npm debug log file attached...
I also remember having a hard time getting this to install on debian and fedora, and it was impossible to get it going on a raspberry pi running raspbian...
I am afraid I lack to necessary knowledge/skill to fix this project so that it builds/installs without problem.
Those times when it does work, this library is really good, I'd like to keep using it...
`> [email protected] install /Users/filipschlosser/dev/zdeapp/node_modules/printer
node-gyp rebuild
CXX(target) Release/obj.target/node_printer/src/node_printer_posix.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from ../src/node_printer_posix.cc:1:
In file included from ../src/node_printer.hpp:6:
In file included from /Users/filipschlosser/.node-gyp/6.14.3/include/node/node.h:42:
/Users/filipschlosser/.node-gyp/6.14.3/include/node/v8.h:21:10: fatal error: 'utility' file not found
#include make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/filipschlosser/.nvm/versions/node/v6.14.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/Users/filipschlosser/.nvm/versions/node/v6.14.3/bin/node" "/Users/filipschlosser/.nvm/versions/node/v6.14.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/filipschlosser/dev/zdeapp/node_modules/printer
gyp ERR! node -v v6.14.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Darwin 18.0.0
npm ERR! argv "/Users/filipschlosser/.nvm/versions/node/v6.14.3/bin/node" "/Users/filipschlosser/.nvm/versions/node/v6.14.3/bin/npm" "install" "printer"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the printer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs printer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls printer
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:`
I managed to build this when I installed node version 8...
@Slos , do you remember having to do anything in particular to get this working on node v.8 (or which specific version)? I am also on OS X Mojave and have tried on 6.11, 8.12, and 9.5 to install this for an electron application, and I get some variant of the following no matter what:
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/bennettatoms/.nvm/versions/node/v6.11.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/Users/bennettatoms/.nvm/versions/node/v6.11.0/bin/node" "/Users/bennettatoms/.nvm/versions/node/v6.11.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/bennettatoms/electron_projects/angular-electron/node_modules/printer
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
@bennettatoms
Hi Bennett,
I am not sure what I did to get it going in the end, it did quite a few things... :/
I have installed node version 8.12.0 and you need to make sure this node version is in your $PATH (I noticed when I switch node versions using nvm the path is not always updated correctly (or you need to restart the terminal to get the new $PATH to work)). I also remember reinstalling Xcode but I don't think that did anything.
I think I also installed the libcups2-dev package (or OS X equivalent) somehow (I don't remember exactly how) and also the g++ libraries.
I'm sorry if my answer is a bit vague but I was throwing everything I had at the problem and I don't know what it was that got me going in the end...
You think it would help if I zipped up my local module and send it to you?
@Slos , if you don't mind sending your local version, I would really appreciate it. I have similarly spent a bunch of hours trying different combinations of things to get this to build with no luck (and it used to work before I upgraded my OS to Mojave). My email is bennettadams46 AT gmail dot com. Thank you very much!
@bennettatoms , I've sent it via retransfer, gmail does not allow me to attach the files to an e-mail... just unzip the thing I sent you inside the node_modules directory and you should be good (this is to be used with node version 8.12.0 by the way)
Thank you, @Slos . I received the zip file, I can see that it seems to have built correctly for you in the build/Release/
directory. Unfortunately I am trying to incorporate this module in an electron application, and the packaging process for that runs the node-gyp rebuild
to install printer
all over again, and it of course is failing on my machine, so I am unable to deploy the application. Might need to figure a way to include the module in the build without re-running node-gyp rebuild
. I appreciate your help, though!