galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.14k stars 169 forks source link

Install issue with Node V12 #394

Open KbDinesh87 opened 5 years ago

KbDinesh87 commented 5 years ago

Node version : v12.3.1

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! hummus@1.0.104 install: node-pre-gyp install --fallback-to-build $EXTRA_NODE_PRE_GYP_FLAGS npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hummus@1.0.104 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

fayad commented 5 years ago

Updating this related thread here to avoid a possible duplicate issue.

We are unable to pull hummus v1.0.104 on node:alpine (v12.4.0) and it seems to be missing files from server end.

hummus@1.0.104 install /usr/src/app/node_modules/hummus node-pre-gyp install --fallback-to-build $EXTRA_NODE_PRE_GYP_FLAGS

node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://hummus.s3-us-west-2.amazonaws.com/hummus/v1.0.104/node-v72-linux-x64-musl.tar.gz node-pre-gyp WARN Pre-built binaries not found for hummus@1.0.104 and node@12.4.0 (node-v72 ABI, musl) (falling back to source compile with node-gyp) gyp ERR! configure error

Frank683 commented 4 years ago

Since the author recently announced that he will not maintain this repo any further we must sadly state that hummus is dead for anyone who must use node 12.x :-(

abenhamdine commented 4 years ago

Since the author recently announced that he will not maintain this repo any further we must sadly state that hummus is dead for anyone who must use node 12.x :-(

We use hummusJS with nodejs 12 in production since months without any problem.

Frank683 commented 4 years ago

Since the author recently announced that he will not maintain this repo any further we must sadly state that hummus is dead for anyone who must use node 12.x :-(

We use hummusJS with nodejs 12 in production since months without any problem.

Not by downloading precompiled binaries but compiling from source?

abenhamdine commented 4 years ago

Since the author recently announced that he will not maintain this repo any further we must sadly state that hummus is dead for anyone who must use node 12.x :-(

We use hummusJS with nodejs 12 in production since months without any problem.

Not by downloading precompiled binaries but compiling from source?

We use version 1.0.107 and compile from source with the following binding.gyp file :

{
    'targets': [
    {
            'target_name': 'hummus',
            'type': 'loadable_module',
            'product_extension': 'node',
            'dependencies': [
               './src/deps/PDFWriter/binding.gyp:pdfwriter'
            ],
            'include_dirs': [
                './src',
                './src/deps/PDFWriter',
                './src/deps/FreeType/include'
            ],
           'sources': [
                './src/ConstructorsHolder.cpp',
                './src/PDFStreamDriver.cpp',
                './src/DictionaryContextDriver.cpp',
                './src/PDFTextStringDriver.cpp',
                './src/PDFDateDriver.cpp',
                './src/PDFArrayDriver.cpp',
                './src/PDFDictionaryDriver.cpp',
                './src/PDFStreamInputDriver.cpp',
                './src/PDFIndirectObjectReferenceDriver.cpp',
                './src/PDFBooleanDriver.cpp',
                './src/PDFLiteralStringDriver.cpp',
                './src/PDFHexStringDriver.cpp',
                './src/PDFNullDriver.cpp',
                './src/PDFNameDriver.cpp',
                './src/PDFIntegerDriver.cpp',
                './src/PDFRealDriver.cpp',
                './src/PDFSymbolDriver.cpp',
                './src/PDFObjectDriver.cpp',
                './src/PDFReaderDriver.cpp',
                './src/DocumentCopyingContextDriver.cpp',
                './src/ObjectsContextDriver.cpp',
                './src/DocumentContextDriver.cpp',
                './src/ImageXObjectDriver.cpp',
                './src/UsedFontDriver.cpp',
                './src/ResourcesDictionaryDriver.cpp',
                './src/XObjectContentContextDriver.cpp',
                './src/FormXObjectDriver.cpp',
                './src/AbstractContentContextDriver.cpp',
                './src/PageContentContextDriver.cpp',
                './src/PDFPageDriver.cpp',
                './src/PDFPageModifierDriver.cpp',
                './src/PDFWriterDriver.cpp',
                './src/PDFPageInputDriver.cpp',
                './src/InputFileDriver.cpp',
                './src/OutputFileDriver.cpp',
                './src/InfoDictionaryDriver.cpp',
                './src/ByteReaderDriver.cpp',
                './src/ByteReaderWithPositionDriver.cpp',
                './src/ByteWriterDriver.cpp',
                './src/ByteWriterWithPositionDriver.cpp',
                './src/ObjectByteReader.cpp',
                './src/ObjectByteReaderWithPosition.cpp',
                './src/ObjectByteWriter.cpp',
                './src/ObjectByteWriterWithPosition.cpp',
                './src/PDFObjectParserDriver.cpp',
                './src/hummus.cpp'
            ]

       },
        {
            'target_name': 'action_after_build',
            'type': 'none',
            'dependencies': [ '<(module_name)' ],
            'copies': [
                {
                    'files': [
                        '<(PRODUCT_DIR)/hummus.node'
                    ],
                    'destination': '<(module_path)'
                }
            ]
        }

    ]        
}

therefore we deploy the hummusjs code in /src
it works perfectly

kwisatz commented 4 years ago

Thanks @abenhamdine for sharing!

Unfortunately that's only half the battle. We'll have to get someone or some group to take over maintenance of hummus or we'll all have to eventually migrate to something else anyway…

Frank683 commented 4 years ago

@abenhamdine I tried it under Windows 10 x64 and binaries are available for download.

node-pre-gyp http GET https://hummus.s3-us-west-2.amazonaws.com/hummus/v1.0.108/node-v72-win32-x64-unknown.tar.gz
node-pre-gyp http 200 https://hummus.s3-us-west-2.amazonaws.com/hummus/v1.0.108/node-v72-win32-x64-unknown.tar.gz
node-pre-gyp info install unpacking binding/hummus.node
node-pre-gyp info tarball done parsing tarball

We also need it to work on Linux, so I will also conduct some tests there