question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[0.62.1] Module RCTLog is not a registered callable module (calling logIfNoNativeHook)

See original GitHub issue

Environment

System:
    OS: macOS 10.15.1
    CPU: (4) x64 Intel(R) Core(TM) i5-4570R CPU @ 2.70GHz
    Memory: 193.41 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.13.0 - /usr/local/bin/node
    Yarn: 1.19.1 - /usr/local/bin/yarn
    npm: 6.12.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.8.4 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6241897
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  Languages:
    Java: 13.0.2 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.1 => 0.62.1 
  npmGlobalPackages:
    *react-native*: Not Found

Upgrading version

Upgrading from 0.61.5 -> 0.62.1

Description

I followed all of the guides regarding the upgrade and got this issue. I tried to solve it by creating a new typescript project on version 0.62.1 and copying all my code over, however, the error still remains.

In the JS console there are several other similar issues shown like so:

Screenshot 2020-04-08 at 15 46 58

It’s worth nothing that hot refresh does not work either for some reason. This issue did not exist before upgrading to 0.62.1. I downgraded to 0.62.0 also but to now avail

Reproducible demo

App.tsx

import React from 'react'
import {RelayEnvironmentProvider} from 'relay-hooks'
import {Provider} from 'react-redux'
import store, {persistor} from './redux/store'
import environment from './relay/environment'

const App = () => {
  return (
    <Provider store={store}>
      <RelayEnvironmentProvider environment={environment}>
        <></>
      </RelayEnvironmentProvider>
    </Provider>
  )
}

Podfile

platform :ios, '10.3'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
inhibit_all_warnings!

def add_flipper_pods!
  version = '~> 0.33.1'
  pod 'FlipperKit', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug'
end

# Post Install processing for Flipper
def flipper_post_install(installer)
  installer.pods_project.targets.each do |target|
    if target.name == 'YogaKit'
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '4.1'
      end
    end
  end
end

target 'murch' do
  # Pods for murch
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
  pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  target 'murchTests' do
    inherit! :complete
    # Pods for testing
  end

  use_native_modules!
  
  pod 'SVProgressHUD'

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  add_flipper_pods!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target 'murch-tvOS' do
  # Pods for murch-tvOS

  target 'murch-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

Screenshots

Simulator Screen Shot - iPhone 11 - 2020-04-08 at 15 48 56

What I’ve tried

  • Copying my code into a new project
  • Clearing Xcode cache
  • rm -rf node_moduels && yarn
  • react-native start --reset-cache

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:7
  • Comments:16

github_iconTop GitHub Comments

14reactions
jules15commented, Jun 3, 2020

I was experiencing this problem. In my case, I had run yarn in the root folder of my native module project (unnecessarily). For some reason, the presence of the node_modules folder at the root prevented the example app from running properly. If I removed the root node_modules folder, the app ran correctly.

5reactions
MJXincommented, Aug 20, 2020

Add blacklist tometro.config.js like this

const blacklist = require('metro-config/src/defaults/blacklist');
module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
  resolver: {
    blacklistRE: blacklist([
      /node_modules\/.*\/node_modules\/react-native\/.*/,
    ])
  },
};
Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native: Module RCTLog is not a registered callable ...
I made a React Native package and published it on npm. The problem is when I run the code as a normal component...
Read more >
React-Native: Module RCTLog is not a registered callable ...
iOS : React-Native: Module RCTLog is not a registered callable module [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >
Module Rctlog Is Not A Registered Callable Module ... - ADocLib
Invariant Violation: Module RCTLog is not a registered callable module calling logIfNoNativeHook. It only occur on remote debugging mode if you disable.
Read more >
How to solve this error? Invariant violation module appregistry ...
Invariant violation module appregistry is not a registered callable module? ... I'm not sure what to do with this error or how to...
Read more >
React-Native: Module RCTLog is not a registered callable ...
Unhandled JS Exception: Module RCTLog is not a registered callable module. RCTFatal + 124 -[RCTExceptionsManager reportFatalException:stack:exceptionId:] + ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found