Closed Kukiwon closed 2 years ago
Hi,
When I run npm install the installation fails:
npm install
4320 verbose stack Error: command failed 4320 verbose stack at ChildProcess.<anonymous> (/Users/jvankuijk/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27) 4320 verbose stack at ChildProcess.emit (node:events:527:28) 4320 verbose stack at maybeClose (node:internal/child_process:1092:16) 4320 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) 4321 verbose pkgid poppler-simple@0.11.1 4322 verbose cwd /Users/jvankuijk/Developer/divid-api 4323 verbose Darwin 21.5.0 4324 verbose node v16.15.1 4325 verbose npm v8.11.0 4326 error code 1 4327 error path /Users/jvankuijk/Developer/divid-api/node_modules/poppler-simple 4328 error command failed 4329 error command sh -c (node-gyp rebuild) || (exit 1) 4330 error CXX(target) Release/obj.target/poppler/src/poppler.o 4330 error CXX(target) Release/obj.target/poppler/src/NodePopplerDocument.o 4331 error gyp info it worked if it ends with ok 4331 error gyp info using node-gyp@8.4.1 4331 error gyp info using node@16.15.1 | darwin | arm64 4331 error gyp info find Python using Python version 3.9.13 found at "/opt/homebrew/opt/python@3.9/bin/python3.9" 4331 error gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9 4331 error gyp info spawn args [ 4331 error gyp info spawn args '/Users/jvankuijk/Developer/divid-api/node_modules/node-gyp/gyp/gyp_main.py', 4331 error gyp info spawn args 'binding.gyp', 4331 error gyp info spawn args '-f', 4331 error gyp info spawn args 'make', 4331 error gyp info spawn args '-I', 4331 error gyp info spawn args '/Users/jvankuijk/Developer/divid-api/node_modules/poppler-simple/build/config.gypi', 4331 error gyp info spawn args '-I', 4331 error gyp info spawn args '/Users/jvankuijk/Developer/divid-api/node_modules/node-gyp/addon.gypi', 4331 error gyp info spawn args '-I', 4331 error gyp info spawn args '/Users/jvankuijk/Library/Caches/node-gyp/16.15.1/include/node/common.gypi', 4331 error gyp info spawn args '-Dlibrary=shared_library', 4331 error gyp info spawn args '-Dvisibility=default', 4331 error gyp info spawn args '-Dnode_root_dir=/Users/jvankuijk/Library/Caches/node-gyp/16.15.1', 4331 error gyp info spawn args '-Dnode_gyp_dir=/Users/jvankuijk/Developer/divid-api/node_modules/node-gyp', 4331 error gyp info spawn args '-Dnode_lib_file=/Users/jvankuijk/Library/Caches/node-gyp/16.15.1/<(target_arch)/node.lib', 4331 error gyp info spawn args '-Dmodule_root_dir=/Users/jvankuijk/Developer/divid-api/node_modules/poppler-simple', 4331 error gyp info spawn args '-Dnode_engine=v8', 4331 error gyp info spawn args '--depth=.', 4331 error gyp info spawn args '--no-parallel', 4331 error gyp info spawn args '--generator-output', 4331 error gyp info spawn args 'build', 4331 error gyp info spawn args '-Goutput_dir=.' 4331 error gyp info spawn args ] 4331 error gyp info spawn make 4331 error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] 4331 error ../src/NodePopplerDocument.cc:20:37: error: no matching constructor for initialization of 'PDFDoc' 4331 error std::unique_ptr<PDFDoc> doc(new PDFDoc(new MemStream(buffer, 0, length, std::move(obj)), ownerPassword, userPassword)); 4331 error ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4331 error /opt/homebrew/Cellar/poppler/22.06.0/include/poppler/PDFDoc.h:139:14: note: candidate constructor not viable: no known conversion from 'GooString *' to 'const std::optional<GooString>' for 2nd argument 4331 error explicit PDFDoc(BaseStream *strA, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr, const std::function<void()> &xrefReconstructedCallback = {}); 4331 error ^ 4331 error /opt/homebrew/Cellar/poppler/22.06.0/include/poppler/PDFDoc.h:132:14: note: candidate constructor not viable: no known conversion from 'MemStream *' to 'std::unique_ptr<GooString>' for 1st argument 4331 error explicit PDFDoc(std::unique_ptr<GooString> &&fileNameA, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr, 4331 error ^ 4331 error /opt/homebrew/Cellar/poppler/22.06.0/include/poppler/PDFDoc.h:142:5: note: candidate constructor not viable: requires 1 argument, but 3 were provided 4331 error PDFDoc(const PDFDoc &) = delete; 4331 error ^ 4331 error /opt/homebrew/Cellar/poppler/22.06.0/include/poppler/PDFDoc.h:371:5: note: candidate constructor not viable: requires 0 arguments, but 3 were provided 4331 error PDFDoc(); 4331 error ^ 4331 error ../src/NodePopplerDocument.cc:64:52: error: reference to type 'const std::optional<GooString>' could not bind to an lvalue of type 'GooString *' 4331 error doc = PDFDocFactory().createPDFDoc(*fileNameA, ownerPassword, userPassword); 4331 error ^~~~~~~~~~~~~ 4331 error /opt/homebrew/Cellar/poppler/22.06.0/include/poppler/PDFDocFactory.h:49:96: note: passing argument to parameter 'ownerPassword' here 4331 error std::unique_ptr<PDFDoc> createPDFDoc(const GooString &uri, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr); 4331 error ^ 4331 error 2 errors generated. 4331 error make: *** [Release/obj.target/poppler/src/NodePopplerDocument.o] Error 1 4331 error gyp ERR! build error 4331 error gyp ERR! stack Error: `make` failed with exit code: 2 4331 error gyp ERR! stack at ChildProcess.onExit (/Users/jvankuijk/Developer/divid-api/node_modules/node-gyp/lib/build.js:194:23) 4331 error gyp ERR! stack at ChildProcess.emit (node:events:527:28) 4331 error gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) 4331 error gyp ERR! System Darwin 21.5.0 4331 error gyp ERR! command "/Users/jvankuijk/.nvm/versions/node/v16.15.1/bin/node" "/Users/jvankuijk/Developer/divid-api/node_modules/.bin/node-gyp" "rebuild" 4331 error gyp ERR! cwd /Users/jvankuijk/Developer/divid-api/node_modules/poppler-simple 4331 error gyp ERR! node -v v16.15.1 4331 error gyp ERR! node-gyp -v v8.4.1 4331 error gyp ERR! not ok 4332 verbose exit 1
I'm running Node v16.15.1 on Apple Silicon with poppler version 22.6.0.
Seems like a breaking change in poppler. Thanks, will look into it.
Please look at v0.11.2
Hi,
When I run
npm install
the installation fails:I'm running Node v16.15.1 on Apple Silicon with poppler version 22.6.0.