orientechnologies / orientjs

The official fast, lightweight node.js client for OrientDB
http://orientdb.com
Other
327 stars 67 forks source link

node-gyp rebuild error on windows and can not find module 'arrify' on ubuntu #413

Closed terrygreen0606 closed 8 months ago

terrygreen0606 commented 4 years ago

I installed orientjs with npm on windows and ubuntu.

When I execute the file that requires orientjs, it gives node-gyp rebuild error on windows and can not find module 'arrify' on ubuntu.

Could you help me fix these?

These are the error image of ubuntu and windows.

ubuntu_error

windows_error

jymcheong commented 4 years ago

Encountered the same problem. Went into my VM that had a functional version of my software & checked the node_modules directory, I noticed something different.

Root Cause

Changes in parse-function module broke orientjs

Working version: parse-function@5.4.4

Failed version: parse-function@5.5.0

Resolution

Install parse-function@5.4.4

I tested at my end, works fine now.

Screenshot 2019-12-03 13 25 44

terrygreen0606 commented 4 years ago

Thank you very much for your help, jymcheong. It's working.

terrygreen0606 commented 4 years ago

Do I have to install arrify, too? I installed that first and then installed parse-function@5.4.4.

jymcheong commented 4 years ago

Do I have to install arrify, too? I installed that first and then installed parse-function@5.4.4.

Parse-function@5.4.4 likely does not depend on arrify. It is the newer 5.5.0 that needs it. But the way it is used in orientJS seems to be broken even after installing arrify. So I just roll back to older parse-function since I not sure what to change at orientJS to fix the issue.

Nopzen commented 4 years ago

I can confirm this issue aswell, @jymcheong 's fix of installing 5.4.4 seems to be working . But would be nice to be fixed resolved from maintainers :)

terrygreen0606 commented 4 years ago

Do I have to install arrify, too? I installed that first and then installed parse-function@5.4.4.

Parse-function@5.4.4 likely does not depend on arrify. It is the newer 5.5.0 that needs it. But the way it is used in orientJS seems to be broken even after installing arrify. So I just roll back to older parse-function since I not sure what to change at orientJS to fix the issue.

That's right. I removed arrify and installed just parse-function@5.4.4. And it works without any problems. I don't know why it doesn't go on with the new version of parse-function.

I found another way to use the new version of parse-function with orientjs. Navigate to node_modules/orientjs/lib/db/db.js and then find require('parse-function')(). Here, I removed the last brackets so that it looks like require('parse-function'). This also works. I don't know the reason, but anyhow it works without any problems with the version of 5.4.4.

wolf4ood commented 4 years ago

Hi Folks

i've merged this PR https://github.com/orientechnologies/orientjs/pull/416

which fixed this. I will publish a new version most likely today

Thanks

tglman commented 8 months ago

Hi,

Fixed a while ago, closing