blackbeam / poppler-simple

A simple javascript interface to poppler library
Apache License 2.0
37 stars 14 forks source link

Installation fails on node v6.11.4 and poppler 0.60.1 #20

Closed Kukiwon closed 7 years ago

Kukiwon commented 7 years ago

I can't install this package, see:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/jvankuijk/.nvm/versions/node/v6.11.4/bin/node',
1 verbose cli   '/Users/jvankuijk/.nvm/versions/node/v6.11.4/bin/npm',
1 verbose cli   'install' ]
2 info using npm@3.10.10
3 info using node@v6.11.4
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly install normalizeTree
8 silly loadCurrentTree Finishing
9 silly loadIdealTree Starting
10 silly install loadIdealTree
11 silly cloneCurrentTree Starting
12 silly install cloneCurrentTreeToIdealTree
13 silly cloneCurrentTree Finishing
14 silly loadShrinkwrap Starting
15 silly install loadShrinkwrap
16 silly loadShrinkwrap Finishing
17 silly loadAllDepsIntoIdealTree Starting
18 silly install loadAllDepsIntoIdealTree
19 silly loadAllDepsIntoIdealTree Finishing
20 silly loadIdealTree Finishing
21 silly currentTree poppler-simple@0.2.8
21 silly currentTree +-- balanced-match@1.0.0
21 silly currentTree +-- bluebird@3.5.1
21 silly currentTree +-- brace-expansion@1.1.8
21 silly currentTree +-- browser-stdout@1.3.0
21 silly currentTree +-- commander@2.11.0
21 silly currentTree +-- concat-map@0.0.1
21 silly currentTree +-- debug@3.1.0
21 silly currentTree +-- diff@3.3.1
21 silly currentTree +-- escape-string-regexp@1.0.5
21 silly currentTree +-- fs.realpath@1.0.0
21 silly currentTree +-- glob@7.1.2
21 silly currentTree +-- growl@1.10.3
21 silly currentTree +-- has-flag@2.0.0
21 silly currentTree +-- he@1.1.1
21 silly currentTree +-- inflight@1.0.6
21 silly currentTree +-- inherits@2.0.3
21 silly currentTree +-- minimatch@3.0.4
21 silly currentTree +-- minimist@0.0.8
21 silly currentTree +-- mkdirp@0.5.1
21 silly currentTree +-- mocha@4.0.1
21 silly currentTree +-- ms@2.0.0
21 silly currentTree +-- nan@2.7.0
21 silly currentTree +-- once@1.4.0
21 silly currentTree +-- path-is-absolute@1.0.1
21 silly currentTree +-- supports-color@4.4.0
21 silly currentTree `-- wrappy@1.0.2
22 silly idealTree poppler-simple@0.2.8
22 silly idealTree +-- balanced-match@1.0.0
22 silly idealTree +-- bluebird@3.5.1
22 silly idealTree +-- brace-expansion@1.1.8
22 silly idealTree +-- browser-stdout@1.3.0
22 silly idealTree +-- commander@2.11.0
22 silly idealTree +-- concat-map@0.0.1
22 silly idealTree +-- debug@3.1.0
22 silly idealTree +-- diff@3.3.1
22 silly idealTree +-- escape-string-regexp@1.0.5
22 silly idealTree +-- fs.realpath@1.0.0
22 silly idealTree +-- glob@7.1.2
22 silly idealTree +-- growl@1.10.3
22 silly idealTree +-- has-flag@2.0.0
22 silly idealTree +-- he@1.1.1
22 silly idealTree +-- inflight@1.0.6
22 silly idealTree +-- inherits@2.0.3
22 silly idealTree +-- minimatch@3.0.4
22 silly idealTree +-- minimist@0.0.8
22 silly idealTree +-- mkdirp@0.5.1
22 silly idealTree +-- mocha@4.0.1
22 silly idealTree +-- ms@2.0.0
22 silly idealTree +-- nan@2.7.0
22 silly idealTree +-- once@1.4.0
22 silly idealTree +-- path-is-absolute@1.0.1
22 silly idealTree +-- supports-color@4.4.0
22 silly idealTree `-- wrappy@1.0.2
23 silly generateActionsToTake Starting
24 silly install generateActionsToTake
25 silly generateActionsToTake Finishing
26 silly diffTrees action count 0
27 silly decomposeActions action count 0
28 silly runTopLevelLifecycles Starting
29 silly install runPreinstallTopLevelLifecycles
30 silly preinstall poppler-simple@0.2.8 /Users/jvankuijk/Developer/poppler-simple/poppler-simple-22507039
31 info lifecycle poppler-simple@0.2.8~preinstall: poppler-simple@0.2.8
32 verbose lifecycle poppler-simple@0.2.8~preinstall: unsafe-perm in lifecycle true
33 verbose lifecycle poppler-simple@0.2.8~preinstall: PATH: /Users/jvankuijk/.nvm/versions/node/v6.11.4/lib/node_modules/npm/bin/node-gyp-bin:/Users/jvankuijk/Developer/poppler-simple/node_modules/.bin:/Users/jvankuijk/.nvm/versions/node/v6.11.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
34 verbose lifecycle poppler-simple@0.2.8~preinstall: CWD: /Users/jvankuijk/Developer/poppler-simple
35 silly lifecycle poppler-simple@0.2.8~preinstall: Args: [ '-c',
35 silly lifecycle   '((npm install nan) && (node-gyp configure)) || (exit 0)' ]
36 silly lifecycle poppler-simple@0.2.8~preinstall: Returned: code: 0  signal: null
37 silly executeActions Starting
38 silly install executeActions
39 silly doSerial global-install 0
40 silly doParallel fetch 0
41 verbose correctMkdir /Users/jvankuijk/.npm/_locks correctMkdir not in flight; initializing
42 verbose lock using /Users/jvankuijk/.npm/_locks/staging-4f31490d1125845e.lock for /Users/jvankuijk/Developer/poppler-simple/node_modules/.staging
43 silly doParallel extract 0
44 silly doParallel preinstall 0
45 silly doReverseSerial remove 0
46 silly doSerial move 0
47 silly doSerial finalize 0
48 silly doSerial build 0
49 silly doSerial global-link 0
50 silly doParallel update-linked 0
51 silly doSerial install 0
52 silly doSerial postinstall 0
53 verbose unlock done using /Users/jvankuijk/.npm/_locks/staging-4f31490d1125845e.lock for /Users/jvankuijk/Developer/poppler-simple/node_modules/.staging
54 silly executeActions Finishing
55 silly rollbackFailedOptional Starting
56 silly rollbackFailedOptional Finishing
57 silly install runPostinstallTopLevelLifecycles
58 silly build poppler-simple@0.2.8
59 info linkStuff poppler-simple@0.2.8
60 silly linkStuff poppler-simple@0.2.8 has /Users/jvankuijk/Developer as its parent node_modules
61 verbose linkBins poppler-simple@0.2.8
62 verbose linkMans poppler-simple@0.2.8
63 silly install poppler-simple@0.2.8 /Users/jvankuijk/Developer/poppler-simple/poppler-simple-22507039
64 info lifecycle poppler-simple@0.2.8~install: poppler-simple@0.2.8
65 verbose lifecycle poppler-simple@0.2.8~install: unsafe-perm in lifecycle true
66 verbose lifecycle poppler-simple@0.2.8~install: PATH: /Users/jvankuijk/.nvm/versions/node/v6.11.4/lib/node_modules/npm/bin/node-gyp-bin:/Users/jvankuijk/Developer/poppler-simple/node_modules/.bin:/Users/jvankuijk/.nvm/versions/node/v6.11.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
67 verbose lifecycle poppler-simple@0.2.8~install: CWD: /Users/jvankuijk/Developer/poppler-simple
68 silly lifecycle poppler-simple@0.2.8~install: Args: [ '-c', '(node-gyp rebuild) || (exit 1)' ]
69 silly lifecycle poppler-simple@0.2.8~install: Returned: code: 1  signal: null
70 info lifecycle poppler-simple@0.2.8~install: Failed to exec install script
71 warn poppler-simple@0.2.8 No license field.
72 verbose If you need help, you may report this error at:
72 verbose     <https://github.com/npm/npm/issues>
73 verbose stack Error: poppler-simple@0.2.8 install: `(node-gyp rebuild) || (exit 1)`
73 verbose stack Exit status 1
73 verbose stack     at EventEmitter.<anonymous> (/Users/jvankuijk/.nvm/versions/node/v6.11.4/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
73 verbose stack     at emitTwo (events.js:106:13)
73 verbose stack     at EventEmitter.emit (events.js:191:7)
73 verbose stack     at ChildProcess.<anonymous> (/Users/jvankuijk/.nvm/versions/node/v6.11.4/lib/node_modules/npm/lib/utils/spawn.js:40:14)
73 verbose stack     at emitTwo (events.js:106:13)
73 verbose stack     at ChildProcess.emit (events.js:191:7)
73 verbose stack     at maybeClose (internal/child_process.js:920:16)
73 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
74 verbose pkgid poppler-simple@0.2.8
75 verbose cwd /Users/jvankuijk/Developer/poppler-simple
76 error Darwin 17.0.0
77 error argv "/Users/jvankuijk/.nvm/versions/node/v6.11.4/bin/node" "/Users/jvankuijk/.nvm/versions/node/v6.11.4/bin/npm" "install"
78 error node v6.11.4
79 error npm  v3.10.10
80 error code ELIFECYCLE
81 error poppler-simple@0.2.8 install: `(node-gyp rebuild) || (exit 1)`
81 error Exit status 1
82 error Failed at the poppler-simple@0.2.8 install script '(node-gyp rebuild) || (exit 1)'.
82 error Make sure you have the latest version of node.js and npm installed.
82 error If you do, this is most likely a problem with the poppler-simple package,
82 error not with npm itself.
82 error Tell the author that this fails on your system:
82 error     (node-gyp rebuild) || (exit 1)
82 error You can get information on how to open an issue for this project with:
82 error     npm bugs poppler-simple
82 error Or if that isn't available, you can get their info via:
82 error     npm owner ls poppler-simple
82 error There is likely additional logging output above.
83 verbose exit [ 1, true ]
blackbeam commented 7 years ago

Hi!

Please try this command to install it:

CXXFLAGS="-I/usr/local/Cellar/poppler/0.60.1/include -std=c++11 -stdlib=libc++" npm install poppler-simple
Kukiwon commented 7 years ago

That seems to work @blackbeam. Thanks for your help! Do you know if there is a way to add these flags to a package.json? 👍

blackbeam commented 7 years ago

Do you know if there is a way to add these flags to a package.json?

Not sure. I'll try to tweak binding.gyp and publish new version with this flags included.

blackbeam commented 7 years ago

Fixed and published as v0.2.9.

Kukiwon commented 7 years ago

Works like a charm now @blackbeam! Thank you.