1. 程式人生 > >error: bundling: UnableToResolveError: Unable to resolve module `react/lib/ReactDebugCurrentFrame`

error: bundling: UnableToResolveError: Unable to resolve module `react/lib/ReactDebugCurrentFrame`

這裡寫圖片描述

我們在使用react native的時候可能會遇到這個問題,官方推薦做法是:

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
1. Clear watchman watches: watchman watch-del-all.
2. Delete the node_modules folder: rm -rf node_modules && npm install.
3. Reset packager cache: rm -fr $TMPDIR/react-*

or npm start -- --reset-cache.

但是對於有些同學可能並沒有用,這個是由於我們react 和react-native版本的問題,我們修改package.json中的react和react-native的版本號如下:

 "react": "16.0.0-alpha.6",
 "react-native": "0.43.0"

然後我們在命令列輸入:

rm -rf node_modules && npm install//刪除本地模組,並重新安裝
npm start //重新開啟服務

完美解決。

相關推薦

error: bundling: UnableToResolveError: Unable to resolve module `react/lib/ReactDebugCurrentFrame`

我們在使用react native的時候可能會遇到這個問題,官方推薦做法是: This might be related to https://github.com/facebook/react-native/issues/4968 To re

React Native --bundling failed: Error: Unable to resolve module /../react-transform-hmr/lib/index.js

前言 第一次執行 React Native,各種問題,坑死!!! 這裡總結幾個 bug 。 此處針對的 React Native 版本為 "react-native": "0.57.2" 問題一 sha

RN異常:"Unable to resolve module `react-native/Libraries/vendor/emitter/EventEmitter`

1.基本原因:因為版本的不同使得EventEmitter層級目錄發生變化,而最終導致無法找到該檔案 2.解決方法步驟如下:       a.首先先安裝EventEmitter   npm install EventEmitter       b.如果還報錯的話,試著

React-Native Image載入本地圖片報錯error: bundling failed: Error: Unable to resolve module

在初步學習React-Native 用Imgae載入本地的時候 遇到了這個問題,程式碼是這樣的在根目錄下的images資料夾內有backicon.png這張圖片按上面配置的路徑,在程式碼中是可以定位到圖片的,但是實際執行測試就報錯找不到這個圖片,後來測試才發現要這樣寫改成這樣

React Native: Unable to resolve module 'accessibilityinfo'

eset clear install ble ive node tmp 6.0 acc 官方解決方案: 1. Clear watchman watches: `watchman watch-del-all`. 2. Delete the `node_modules` fol

react-native 500 Unable to resolve module 'AccessibilityInfo', when trying to create release bundle.

react-native 在pc端使用模擬器時遇到的RN版本衝突問題的解決方案: 配置react-native環境中,編譯執行React Native 應用時,出現紅屏,500錯誤。錯誤:“Unable to resolve module 'AccessibilityInf

ReactNative踩坑之旅: Unable to resolve moduleError: Plugin

我是在windows搭建的, 過程中碰見了很多問題, 大多數簡單的搜尋就可以解決, 但有兩個較難排查, 現在記錄於下 ps. 建議別用windows自帶的命令列, 出現問題後報錯資訊不能複製是個坑, 建議用WebStorm自帶的Terminal, 自動

React-Native_學習筆記1: Unable to resolve module Dimensions from “...js” Invalid directory /Users/node_m

在使用第三方的元件的時候遇到如題的錯誤提示,原因是第三方組建中呼叫Dimensions 發生的錯誤,解決方法:修改第三方元件 “。js”檔案中的程式碼 var screen = require('D

Unable to resolve module crypto

with n-n pin sta pack nod pda ping eps Add rn-nodeify to your devDependencies in package.json: "devDependencies": { "rn-nodeify": "^6.

ReactNative——問題:Unable to resolve module 'AccessibilityInfo'...doesn't exist in the Haste module map

RN工程執行報錯: Unable to resolve module 'AccessibilityInfo' from '...\node_modules\react-native\Libraries

Unable to resolve module 'AccessibilityInfo' 的解決方案

最近在研究React Native APP 開發,但是按照官方給出來的搭建方案建立了一個AwesomeProject後, 執行 react-native run-android 安裝Android APP後卻是一屏大紅幕報 Unable to resolve modul

Android Studio 3.1.4,gradle 4.4解決Error:Unable to resolve dependency for ':@debug/compileClasspath'問題

    最近把Android studio升級到3.1.4,可是新建一個空專案在build的時候都出現問題,本來不是很重視,把不需要的直接注掉即可,但是因為匯入公司的一個專案來編譯,結果還是報了同樣的錯(引入的依賴庫出現了問題),最終在網上找了很多方法,最終解決了,記錄下過程

Error:Unable to resolve target android-19

一、問題: 重新裝完Ecplise+ATD+Android SDK 在Ecplise工作空間匯入之前寫過的Android專案會出現錯誤,大部分是SDK 版本不符,如下錯誤提示: Error:Unabl

studio3.0關於Error:Unable to resolve dependency for ':@debug/compileClasspath'的解決方案

如果你在老專案遷移到studio3.0時遇到了同樣的問題,希望可以幫到你。 —-首先出現這個問題肯定是studio升級到3.0和Gradle升級到4.1導致的,百度一波後,大致知道是怎麼造成的了,

Android Studio 3.0.1 gradle編譯報錯 Error : unable to resolve dependency for
Ubuntu sudo 出現unable to resolve host 解決方法

主機 oca ubuntu true highlight log ble nbsp light Ubuntu環境, 假設這臺機器名字叫abc(機器的hostname), 每次執行sudo 就出現這個警告訊息:sudo: unable to resolve host abc雖

[CDS][DNS]Unable to resolve host "www.baidu.com": No address associated with hostname

perm wifi style cat man 正常 2-2 get sdn 寫了一個輸入流,用來獲取baidu的數據,結果卡在獲取InputStream,Logcat提示以下錯誤: [CDS][DNS]Unable to resolve host "www.baidu.c

python多版本配置後使用pip出現 Fatal error in launcher: Unable to create process using '"'

com num cnblogs src eat sta reat xxxxx 。。 上一篇剛介紹了python的多版本環境配置,然後再我把python2的python.exe改成python2.exe之後,python2的pip就不好使了,出現了如題的錯誤。。。 然後解決辦

pip安裝出現Fatal error in launcher: Unable to create process using '"'的解決辦法

python2 情況 是否 bubuko inf img where class 控制 python中使用pip安裝模塊時,出現:Fatal error in launcher: Unable to create process using ‘"‘ 原因:系統中可能有多處安

pip3 Fatal error in launcher: Unable to create process using '"' [轉]

using 不讓 In ces 更改 都是 情況下 安裝 關聯 在新環境上安裝python的時候又再次遇到了這個情況,這次留意了一下,發現原來的文章有錯誤的地方,所以來更新一下,應該能解決大部分的問題。 環境是win8,原來只安裝了python2.7。後來因為要用到py