Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Node 10. WAS: Realm fails to install via yarn or npm, with the error Failed to execute 'node-gyp build --fallback-to-build --module=[hidden_path]/node_modules/realm/compiled/node-v64_darwin_x64/realm.node -- #1813

Closed
edmofro opened this issue May 24, 2018 · 27 comments · Fixed by #2092

Comments

@edmofro
Copy link

edmofro commented May 24, 2018

Goals

Use yarn or npm to install realm

Expected Results

Installs correctly

Actual Results

404 on https://static.realm.io/node-pre-gyp/2.3.2/realm-v2.3.2-node-v64-darwin-x64.tar.gz which causes install to fail

Version of Realm and Tooling

  • Realm JS SDK Version: 2.3.2
  • Node or React Native: React Native
  • Client OS & Version: Mac 10.13.4
  • Which debugger for React Native: None
@edmofro
Copy link
Author

edmofro commented May 24, 2018

Same on 2.6.0 https://static.realm.io/node-pre-gyp/2.6.0/realm-v2.6.0-node-v64-darwin-x64.tar.gz

@edmofro edmofro changed the title Realm fails to install via yarn Realm fails to install via yarn or npm, with the error Failed to execute 'node-gyp build --fallback-to-build --module=[hidden_path]/node_modules/realm/compiled/node-v64_darwin_x64/realm.node -- May 24, 2018
@Paradox-AT
Copy link

I am also having the same issue while installing the module.

@kneth
Copy link
Member

kneth commented May 24, 2018

We don't support node version 10 yet.

@edmofro
Copy link
Author

edmofro commented May 24, 2018

Thanks, have downgraded to node 9.8.0 for now.

@kneth
Copy link
Member

kneth commented May 25, 2018

We have done the initial work on it, but some of the node-js' C++ APIs have changed, and NaN has been updated. We plan to return to it soon.

@kneth kneth changed the title Realm fails to install via yarn or npm, with the error Failed to execute 'node-gyp build --fallback-to-build --module=[hidden_path]/node_modules/realm/compiled/node-v64_darwin_x64/realm.node -- Support Node 10. WAS: Realm fails to install via yarn or npm, with the error Failed to execute 'node-gyp build --fallback-to-build --module=[hidden_path]/node_modules/realm/compiled/node-v64_darwin_x64/realm.node -- May 25, 2018
@mnlbox
Copy link

mnlbox commented May 26, 2018

I'm also have same issue and switch from node v.10.1.0 to v9.0.0 and it's working now.

Guys when you plan to update to v10+?

@kneth
Copy link
Member

kneth commented May 26, 2018

Once NaN is stabilized (API wise), we plan to return to it. I hope to include it in a release in June.

@kneth
Copy link
Member

kneth commented Jun 8, 2018

I have investigated it a bit more. It is not Nan nor LZMA (at least 3.0.8 supports - decompress-tarxz depends on it) . It boils to that ursa hasn't released after JoshKaufman/ursa#169 has been merged (see also https://www.npmjs.com/package/ursa).

@esutton
Copy link

esutton commented Jun 14, 2018

@edmofro How do you downgrade node to 9.8.0?

I cannot figure out how to downgrade my build machine to:

I tried:

brew uninstall yarn
brew uninstall --force node
brew install node@9.8.0
Error: No available formula with the name "node@9.8.0" 

Never mind. I ended up using npm instead of homebrew:

brew install npm
npm install -g node@9.8.0
brew install yarn

@edmofro
Copy link
Author

edmofro commented Jun 14, 2018

Check out https://www.npmjs.com/package/n

@rogerkerse
Copy link

I am on node 10 right now and I still cannot install Realm. Has someone dealt with this issue?

@nirinchev
Copy link
Member

The issue is still open which indicates that it has not been resolved yet. Once we release a node 10 compatible version, we'll report here and close the issue.

@kuldeepoza
Copy link

try
npm install -g node@9.8.0
npm i --save realm

@tigranbalayan
Copy link

the issue is actual also with:
node v8.11.2
npm 5.6.0

on CentOS

@jaltin
Copy link

jaltin commented Oct 20, 2018

I also just stumbled on this problem when trying to add realm to a react-native app and having node 10 installed on my machine. Downgrading to 9.11.2 solved it for me.

It took me quite a while to figure out what was going wrong and fix this. It would make sense to mention that node 10 is not supported in the official documents at https://realm.io/docs/javascript/latest/ so others don't run into the same problem.

@kneth kneth self-assigned this Oct 30, 2018
@kneth kneth mentioned this issue Nov 1, 2018
2 tasks
@kneth
Copy link
Member

kneth commented Nov 7, 2018

@tigranbalayan @jaltin @rogerkerse @edmofro @esutton @mnlbox @Paradox-AT @renalpraba

I have released v2.19.0-rc.5 which adds support for node 10. The plan is to do a v2.19.0 release later this week.

@mylylyl
Copy link

mylylyl commented Nov 15, 2018

On node 11 having same issue

@kneth
Copy link
Member

kneth commented Nov 15, 2018

@fisherwise We haven't added support for node 11 yet. Please create an issue for it.

@programmerElephant
Copy link

on node 11 i can't install realm,what should i do?use low node version?

@programmerElephant
Copy link

on node 10 i can use it.

@crobinson42
Copy link

Node 10.13 successful w/ realm@2.19.1.

@denizbas92
Copy link

9.8.0

how di you downgraded node in macbook ?

@zoozalp
Copy link

zoozalp commented Feb 11, 2019

Try n or nvm.

@lienict
Copy link

lienict commented Mar 5, 2019

if you use node version 11 try this

  1. install nvmw
  • npm install -g nvmw
  • install node version 10 ex : nvmw install v10.12.0
  • use node version 10 using this command : nvmw use v10.12.0
  1. edit your realm version in package.json to v2.19.0-rc.5
  2. reinstall in cmd

@joshuapinter
Copy link

I personally prefer nodenv. It works the exact same way as rbenv, if you're familiar with that. But, realm wants either n or nvm, which I think isn't fair. It should just want and expect a version of node. Not any, or worse a specific, node package manager.

@AbhishekNairOfficial
Copy link

AbhishekNairOfficial commented Aug 4, 2019

You guys could also try NVM. It is pretty simple, and allows you to install and use multiple versions of node.
https://github.com/nvm-sh/nvm

@toniton
Copy link

toniton commented Dec 25, 2020

It means that the version of Realm you are requesting for is not yet supported either due to your nodejs version or the architecture of your machine. However you can include additional options to your command to install available ones.

From DOCs as found here: node_modules/realm/node_modules/node-pre-gyp/lib/util/versioning.js, you can add target_arch to suite the system configuration of your machine.

npm i realm --save --target_arch=x64

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.