MatthewVita / node-hl7-complete

Node module that is bridged with the Java Hapi HL7 library.
54 stars 13 forks source link

Package is failing install (v3.0.0) #12

Closed MatthewVita closed 4 years ago

MatthewVita commented 4 years ago

Package (last updated/published ~2 years ago) can't build (sort of..).

Install fails when after initializing a new NPM project that requires 'node-hl7-complete'

V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
                                                    ^
/home/mvim/.node-gyp/8.10.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/javaObject.cpp:117:18: error: ‘class v8::Object’ has no member named ‘SetHiddenValue’; did you mean ‘IntegerValue’?
   javaObjectObj->SetHiddenValue(Nan::New<v8::String>(V8_HIDDEN_MARKER_JAVA_OBJECT).ToLocalChecked(), Nan::New<v8::Boolean>(true));
                  ^~~~~~~~~~~~~~
                  IntegerValue
../src/javaObject.cpp: In static member function ‘static v8::Local<v8::Object> JavaProxyObject::New(Java*, jobject, DynamicProxyData*)’:
../src/javaObject.cpp:349:59: warning: ‘v8::Local<v8::Object> v8::Function::NewInstance() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
   v8::Local<v8::Object> javaObjectObj = ctor->NewInstance();
                                                           ^
In file included from /home/mvim/.node-gyp/8.10.0/include/node/v8.h:26:0,
                 from ../src/javaObject.h:5,
                 from ../src/javaObject.cpp:1:
/home/mvim/.node-gyp/8.10.0/include/node/v8.h:3851:52: note: declared here
   V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
                                                    ^
/home/mvim/.node-gyp/8.10.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
   declarator __attribute__((deprecated(message)))
   ^~~~~~~~~~
../src/javaObject.cpp:350:18: error: ‘class v8::Object’ has no member named ‘SetHiddenValue’; did you mean ‘IntegerValue’?
   javaObjectObj->SetHiddenValue(Nan::New<v8::String>(V8_HIDDEN_MARKER_JAVA_OBJECT).ToLocalChecked(), Nan::New<v8::Boolean>(true));
                  ^~~~~~~~~~~~~~
                  IntegerValue
nodejavabridge_bindings.target.mk:110: recipe for target 'Release/obj.target/nodejavabridge_bindings/src/javaObject.o' failed
make: *** [Release/obj.target/nodejavabridge_bindings/src/javaObject.o] Error 1
make: Leaving directory '/home/mvim/test/node_modules/node-hl7-complete/node_modules/java/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2

Installs correctly when cloning this repo and running NPM install manually (???)

> java@0.9.1 install /home/mvim/Desktop/asdf/node-hl7-complete/node_modules/java
> node-gyp rebuild

make: Entering directory '/home/mvim/Desktop/asdf/node-hl7-complete/node_modules/java/build'
  CXX(target) Release/obj.target/nodejavabridge_bindings/src/java.o
  CXX(target) Release/obj.target/nodejavabridge_bindings/src/javaObject.o
  CXX(target) Release/obj.target/nodejavabridge_bindings/src/javaScope.o
  CXX(target) Release/obj.target/nodejavabridge_bindings/src/methodCallBaton.o
  CXX(target) Release/obj.target/nodejavabridge_bindings/src/nodeJavaBridge.o
  CXX(target) Release/obj.target/nodejavabridge_bindings/src/utils.o
  SOLINK_MODULE(target) Release/obj.target/nodejavabridge_bindings.node
  COPY Release/nodejavabridge_bindings.node
make: Leaving directory '/home/mvim/Desktop/asdf/node-hl7-complete/node_modules/java/build'

> java@0.9.1 postinstall /home/mvim/Desktop/asdf/node-hl7-complete/node_modules/java
> node postInstall.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN node-hl7-complete@3.0.0 No repository field.

Thoughts

It is very confusing that pulling down this repo and manually building works -but- using the solution via NPM is not gucci.

Things to look into:

shadarap commented 4 years ago

This looks like a package I'd love to utilize, I would prefer not to re-invent the wheel, however I'm also unable do an npm install :(

CragVFX commented 4 years ago

@shadarap check out https://github.com/ironbridgecorp/hl7-standard , open source hl7 lib

doryosef commented 4 years ago

@shadarap This worked for me npm install https://github.com/MatthewVita/node-hl7-complete

shadarap commented 4 years ago

@CragVFX Thank you so much! That project does exactly what we need with very little dependencies. We've been able to implement on a nodejs server and an angular front end webpage!

@doryosef Thank you for taking the time to help me out, this project looks great but for our small webapp the hl7-standard package will be perfect.

MatthewVita commented 4 years ago

Hello all, sorry I'm 13 days late to reply.

A while back (last October), I was very troubled with this issue and couldn't find a solution. (I should have put a notice of the issue at the top of the readme).

@doryosef's very clever solution of npm installing directly to this repo link works and I still don't know why vs regular npm install <name>. The GOOD news is it's working from NPM again... I bumped the package version, npm inited a new project, did doryosef's "trick", cd'ed into it, and entered npm publish.

tl;dr: npm i node-hl7-complete --save works again (at least on my Ubuntu OS, with all package requirements met as listed on the readme.) Please let me know if any of you (or future posters) have issues.

@shadarap I'm happy you found a lighter project to meet your needs! This repo is heavy-weight and is aimed at programmers that would really benefit from Hapi.

nidhi95 commented 4 years ago

Hi, This package looks like what I'm looking for but, having issue in 'npm install' :disappointed:

Screenshot from 2020-06-26 15-11-48

MatthewVita commented 4 years ago

@nidhi95 this could be Java, node-gyp dep, or a node version issue.

Can you first follow https://github.com/joeferner/node-java#installation.

I haven't testing this package on an array of node versions... do you mind trying out a few versions of node with this: https://github.com/nvm-sh/nvm ? This would be great to put on the readme incase newer newer node versions don't work/get an issue

-m