addaleax / lzma-native

Node.js interface to the native liblzma compression library (.xz file format, among others)
MIT License
105 stars 37 forks source link

Cannot find module 'binding-v3.0.4-node-v51-darwin-x64/lzma_native.node' #49

Closed kent2508 closed 6 years ago

kent2508 commented 6 years ago

Hey guy, I'm getting stuck with this issue:

v7.10.0 is already installed. Now using node v7.10.0 (npm v4.2.0) Resolved requirements: { SYNC_SERVER_FOLDER: 'sync', SYNC_ARCHIVE: 'realm-sync-cocoa-2.1.10.tar.xz', SYNC_ARCHIVE_ROOT: 'core' } No lockfile found at the target, proceeding. Extracting realm-sync-cocoa-2.1.10.tar.xz => /Volumes/Data/WORKS/ReactNative/CreditCardMobileApp/node_modules/realm/vendor/realm-ios { Error: Cannot find module '/Volumes/Data/WORKS/ReactNative/CreditCardMobileApp/node_modules/lzma-native/binding-v3.0.4-node-v51-darwin-x64/lzma_native.node' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at /Volumes/Data/WORKS/ReactNative/CreditCardMobileApp/node_modules/lzma-native/index.js:13:14 at Object. (/Volumes/Data/WORKS/ReactNative/CreditCardMobileApp/node_modules/lzma-native/index.js:595:3) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) code: 'MODULE_NOT_FOUND' } Command /bin/sh failed with exit code 1

I installed lzma-native in my RA project, and this list files in lzma were installed:

drwxr-xr-x 20 kent2508 admin 680 Dec 20 14:10 . drwxr-xr-x 719 kent2508 admin 24446 Dec 20 14:10 .. -rw-r--r-- 1 kent2508 admin 5032 Nov 27 20:05 CHANGELOG.md -rw-r--r-- 1 kent2508 admin 1088 Sep 22 17:41 LICENSE -rw-r--r-- 1 kent2508 admin 23728 Sep 22 17:41 README.md -rw-r--r-- 1 kent2508 admin 6652 Nov 26 20:05 README.md.xz drwxr-xr-x 3 kent2508 admin 102 Dec 20 14:10 bin drwxr-xr-x 3 kent2508 admin 102 Dec 20 14:10 binding-v3.0.1-node-v58-linux-x64 drwxr-xr-x 3 kent2508 admin 102 Dec 20 14:10 binding-v3.0.1-node-v59-linux-x64 drwxr-xr-x 3 kent2508 admin 102 Dec 20 14:10 binding-v3.0.3-node-v59-linux-x64 drwxr-xr-x 3 kent2508 admin 102 Dec 20 14:10 binding-v3.0.4-node-v57-darwin-x64 -rw-r--r-- 1 kent2508 admin 3203 Sep 22 17:41 binding.gyp -rwxr-xr-x 1 kent2508 admin 253 Sep 22 17:41 cflags.sh drwxr-xr-x 9 kent2508 admin 306 Dec 20 14:10 deps -rw-r--r-- 1 kent2508 admin 13877 Nov 27 20:05 index.js -rwxr-xr-x 1 kent2508 admin 52 Sep 22 17:41 liblzma-build.sh -rwxr-xr-x 1 kent2508 admin 443 Sep 22 17:41 liblzma-config.sh drwxr-xr-x 111 kent2508 admin 3774 Dec 20 14:10 node_modules -rw-r--r-- 1 kent2508 admin 2408 Dec 20 14:10 package.json drwxr-xr-x 11 kent2508 admin 374 Dec 20 14:10 src

addaleax commented 6 years ago

It sounds like you might be doing the installing & running of your program with different versions of Node?

In either case, you shouldn’t be using Node 7, it’s been unsupported for more than half a year now.

kent2508 commented 6 years ago

Thanks @addaleax for replying very quickly. I'm using node v8.7.0 But maybe the problem come from the xcode-command-line-tool. I'm still using MAC Sierra, not High Sierra, with Xcode v9.0. I'm upgrading my Xcode and try to check it out before report the problem again.

addaleax commented 6 years ago

@kent2508 The first lines of what you pasted say that you are using Node 7.10?

kent2508 commented 6 years ago

Oh sorry, I installed node on 2 location with npm and brew. They installed different versions.

addaleax commented 6 years ago

@kent2508 Sorry not to have followed up here, but yeah, that’s the cause of your error then. Are you having any more trouble loading this module?

addaleax commented 6 years ago

I’m closing for now, please re-open an issue if necessary