realm-js icon indicating copy to clipboard operation
realm-js copied to clipboard

Cannot install realm 10.20.x

Open Uzef1997 opened this issue 2 years ago • 14 comments

How frequently does the bug occur?

All the time

Description

Hello there , I am trying to install the latest version of the realm but it gives me the below error,

error D:\UzefShaikh\GIT\mobile_app\node_modules\realm: Command failed.
Exit code: 1
Command: prebuild-install --tag-prefix= -r napi || cmake-js build
Arguments:
Directory: D:\UzefShaikh\GIT\mobile_app\node_modules\realm
Output:
prebuild-install warn install self signed certificate in certificate chain
[
  'C:\\Program Files\\nodejs\\node.exe',
  'C:\\Users\\Uzef762486\\AppData\\Roaming\\npm\\node_modules\\cmake-js\\bin\\cmake-js',
  'build'
]
ERR! OMG There is no Visual C++ compiler installed. Install Visual C++ Build Toolset or Visual Studio.
ERR! OMG There is no Visual C++ compiler installed. Install Visual C++ Build Toolset or Visual Studio.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

The same is occurring with npm as well I have tried to install and set CMake as a classpath though I don't know why it was throwing an error for cmake at the first try.

If anyone has any idea please help me

React native Version :- 0.69.2 Yarn Version :- v1.22.18

Note:- I have tried using realm 10.19.x it is working and getting installed but I think that there is some issue with the latest version I want to have the latest version of it coz it may have support for react-native-reanimated

Please help Thanks.

Stacktrace & log output

error D:\UzefShaikh\GIT\mobile_app\node_modules\realm: Command failed.
Exit code: 1
Command: prebuild-install --tag-prefix= -r napi || cmake-js build
Arguments:
Directory: D:\UzefShaikh\GIT\mobile_app\node_modules\realm
Output:
prebuild-install warn install self signed certificate in certificate chain
[
  'C:\\Program Files\\nodejs\\node.exe',
  'C:\\Users\\Uzef762486\\AppData\\Roaming\\npm\\node_modules\\cmake-js\\bin\\cmake-js',
  'build'
]
ERR! OMG There is no Visual C++ compiler installed. Install Visual C++ Build Toolset or Visual Studio.
ERR! OMG There is no Visual C++ compiler installed. Install Visual C++ Build Toolset or Visual Studio.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Can you reproduce the bug?

Yes, always

Reproduction Steps

yarn add realm

Version

10.20.x

What SDK flavour are you using?

Local Database only

Are you using encryption?

No, not using encryption

Platform OS and version(s)

Windows 10

Build environment

react-native CLI Yarn package manager

Cocoapods version

1.11.2

Uzef1997 avatar Aug 24 '22 09:08 Uzef1997

@Uzef1997 The latest realm is actually our v11 release candidate. Please give it a try:

npm install [email protected]

This will be compatible with react-native-reanimated

takameyer avatar Aug 25 '22 08:08 takameyer

@Uzef1997 Can you try to download https://static.realm.io/realm-js-prebuilds/10.20.0/realm-v10.20.0-napi-v5-win32-x64.tar.gz manually?

kneth avatar Aug 25 '22 09:08 kneth

Thanks for a response @kneth I am able to download this can you please let me know how can i use this realm.node file which is kept inside tar

Thank you

Uzef1997 avatar Aug 25 '22 10:08 Uzef1997

@Uzef1997 We are just trying to verify why that wasn't downloaded automatically when you npm install. The error message you posted is showing that npm is trying to compile realm...this is the fallback when our precompiled realm binaries are not available. Can you try:

rm -rf node_modules
yarn cache clean
watchman watch-del-all
rm -rf $TMPDIR/metro*
rm -rf $TMPDIR/react-native*
yarn add [email protected]

There should be a realm binary in node-modules/realm/build/Release when this is done.

takameyer avatar Aug 25 '22 11:08 takameyer

@Uzef1997 We are just trying to verify why that wasn't downloaded automatically when you npm install. The error message you posted is showing that npm is trying to compile realm...this is the fallback when our precompiled realm binaries are not available. Can you try:


rm -rf node_modules

yarn cache clean

watchman watch-del-all

rm -rf $TMPDIR/metro*

rm -rf $TMPDIR/react-native*

yarn add [email protected]

There should be a realm binary in node-modules/realm/build/Release when this is done.

I tried this several time but the issue same So i just tried to install it in my another system it got installed but the strange thing is that why the same thing is not happening in my main system i need latest version to support react-native-reanimated i have also tried to install v11.xx same issue is occurring in that one as well but v19.5.x is working fine

Uzef1997 avatar Aug 25 '22 12:08 Uzef1997

Let me summarize to see if I understand it correctly:

  • You have two system, A and B, both running Windows
  • You can install v10.19.5 on A, but not v10.20.0 and v11.0.0-rc.1
  • You can install v10.19.5, v10.20.0 and v11.0.0-rc.1 on B

Please check the version of node on A and B

kneth avatar Aug 25 '22 16:08 kneth

Let me summarize to see if I understand it correctly:

  • You have two system, A and B, both running Windows

  • You can install v10.19.5 on A, but not v10.20.0 and v11.0.0-rc.1

  • You can install v10.19.5, v10.20.0 and v11.0.0-rc.1 on B

Please check the version of node on A and B

The System B is a mac I can install new versions in mac but cannot install then on windows i cannot not tell the node version of mac till monday because of accessibility issue so please give me time till monday i will update you with the version of node on monday

Thanks

Uzef1997 avatar Aug 26 '22 03:08 Uzef1997

Let me summarize to see if I understand it correctly:

  • You have two system, A and B, both running Windows
  • You can install v10.19.5 on A, but not v10.20.0 and v11.0.0-rc.1
  • You can install v10.19.5, v10.20.0 and v11.0.0-rc.1 on B

Please check the version of node on A and B

Hello @kneth sorry for the delayed response the system which is running with windows has node version 16.13.1 and the mac system is having node version 16.15.1 can it be an issue with the node version which is in my windows system

Uzef1997 avatar Aug 31 '22 07:08 Uzef1997

@Uzef1997

I can't imagine that a minor version can have such an impact. It could be interesting to get the full output so you try to run yarn add --verbose [email protected]?

kneth avatar Sep 01 '22 07:09 kneth

@kneth I guess it will be difficult to provide whole log to you as command prompt is not keeping logs from the begining, though here it which i can collect from command prompt, if you have some other method for collecting all the logs please let me know log.txt

Uzef1997 avatar Sep 01 '22 09:09 Uzef1997

@Uzef1997

In the log I notice prebuild-install warn install self signed certificate in certificate chain. Are you behind a proxy?

Maybe there is a solution in https://stackoverflow.com/questions/34608969/stack-error-self-signed-certificate-in-certificate-chain-when-trying-to-build. You can try npm config set strict-ssl false or npm install -g --unsafe-perm binding to see if it makes a difference.

kneth avatar Sep 01 '22 12:09 kneth

I've just run into this error, seemingly because 10.21.0 was just released an hour ago, but there are no assets associated with the release in GitHub - as a result, the prebuild-install script returns nothing, and my machine falls back to running cmake-js, which isn't present on my laptop.

fiznool avatar Sep 12 '22 13:09 fiznool

I've just run into this error, seemingly because 10.21.0 was just released an hour ago, but there are no assets associated with the release in GitHub - as a result, the prebuild-install script returns nothing, and my machine falls back to running cmake-js, which isn't present on my laptop.

the same here!

brunoducattii avatar Sep 12 '22 13:09 brunoducattii

@fiznool & @joaotmachado thanks a lot for mentioning this, we had a bug in our new GitHub action 👍 It should be corrected!

kraenhansen avatar Sep 12 '22 14:09 kraenhansen

I am closing the issue as we believe it has been solved.

kneth avatar Sep 26 '22 17:09 kneth

Hello @kneth the same issue is reproducing with version 11.3.x I am not getting why it is happening in my other MacBook Air (intel processor) the same version has been installed in MacBook pro M2

both are having the same version of node and pod and both are using same package manager as yarn yarn version 1.22.19 node version 18.9.0 pod version 1.11.3

Uzef1997 avatar Nov 30 '22 14:11 Uzef1997

@Uzef1997 Do you still see prebuild-install warn install self signed certificate in certificate chain in the log? My best guess is that you have a proxy which isn't working well together with prebuild-install.

kneth avatar Dec 01 '22 10:12 kneth

No, I do not have any proxy the issue is strange, it is getting installed in my one system but not getting installed in another one, my primary system is having intel processor and my secondary is having m2 inside this issue is happening in my primary system only

Uzef1997 avatar Dec 01 '22 12:12 Uzef1997

Which version of Windows do you use?

kneth avatar Dec 02 '22 08:12 kneth

Which version of Windows do you use?

right now I am facing this issue in macOS Monterey

Uzef1997 avatar Dec 03 '22 17:12 Uzef1997

Which version of Windows do you use?

right now I am facing this issue in macOS Monterey not windows

Uzef1997 avatar Dec 03 '22 17:12 Uzef1997

@Uzef1997 Please create a new issue with all versions and log.

kneth avatar Dec 05 '22 08:12 kneth

@Uzef1997 Do you still see prebuild-install warn install self signed certificate in certificate chain in the log? My best guess is that you have a proxy which isn't working well together with prebuild-install.

@kneth : your guess was correct as the file was not getting download due to some network restrictions, I tried changing Netwrok connection (from wifi to mobile data) it worked like a charm!

husenbyjus avatar Jan 10 '23 11:01 husenbyjus