模块映射中不存在react-native-implementation.js模块

时间:2017-08-19 04:42:55

标签: reactjs react-native native react-native-ios

我已安装react native项目并在我的项目中安装'react-native-firebase'。安装和设置项目后。它显示react-native-implementation.js模块不存在。

我已经按照他们网站上的说明进行了搜索,但仍然没有运气。

This Error Image

我的package.json

{
	"name": "firebaseApp",
	"version": "0.0.1",
	"private": true,
	"scripts": {
		"start": "node node_modules/react-native/local-cli/cli.js start",
		"test": "jest"
	},
	"dependencies": {
		"react": "16.0.0-alpha.12",
		"react-native": "0.47.1",
		"react-native-firebase": "^2.1.2"
	},
	"devDependencies": {
		"babel-jest": "20.0.3",
		"babel-preset-react-native": "2.1.0",
		"jest": "20.0.4",
		"react-test-renderer": "16.0.0-alpha.12"
	},
	"jest": {
		"preset": "react-native"
	}
}

我的podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'firebaseApp' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for firebaseApp
  pod 'Firebase/Core'
  pod 'RNFirebase', :path => '../node_modules/react-native-firebase'

  # pod 'Firebase/AdMob'
  # pod 'Firebase/Analytics'
  # pod 'Firebase/Auth'
  # pod 'Firebase/Crash'
  # pod 'Firebase/Database'
  # pod 'Firebase/DynamicLinks'
  pod 'Firebase/Messaging'
  # pod 'Firebase/RemoteConfig'
  # pod 'Firebase/Storage'

  pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'BatchedBridge', # Required For React Native 0.45.0+
    'Core',
    'ART'
    # Add any other subspecs you want to use in your project
  ]

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

  target 'firebaseAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

# target 'firebaseApp-tvOS' do
#   # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
#   # use_frameworks!
#
#   # Pods for firebaseApp-tvOS
#
#   target 'firebaseApp-tvOSTests' do
#     inherit! :search_paths
#     # Pods for testing
#   end
#
# end

任何人都可以帮助我?

1 个答案:

答案 0 :(得分:2)

  1. 关闭终端机
  2. 重新运行npm install
  3. 再次启动打包程序:react-native运行android / ios。