我删除我的src文件夹后,为了重构这个错误发生.我相信这是一个缓存问题?我试着遵循这个要点,但没有运气.
"反应":"16.4.1",
"反应原生":"0.56.1",
"@ babel/core":"^ 7.1.2",
"预设":["react-native"]
`
import React, { Component } from 'react';
import { Platform, Text, View } from 'react-native';
import { Provider } from 'react-redux';
import { store } from './src/redux/store';
export default class App extends Component<Props> {
state = {
isLoadingComplete: false,
};
render() {
return (
<View>
<Text>Hello??</Text>
<Text>Hello??</Text>
<Text>Hello??</Text>
<Text>Hello??</Text>
<Text>Hello??</Text>
<Text>Hello??</Text>
<Text>Hello??</Text>
</View>
);
}
}
Run Code Online (Sandbox Code Playgroud)
`
我正在尝试运行我的反应本机应用程序,但我不断收到以下错误。
Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(/Users/myname/myapp/index.js: Cannot find module 'babel/plugin-proposal-nullish-coalescing-operator' from '/Users/myname/myapp' (null))
__38-[RCTCxxBridge loadSource:onProgress:]_block_invoke.233
RCTCxxBridge.mm:422
invocation function for block in attemptAsynchronousLoadOfBundleAtURL(NSURL*, void (RCTLoadingProgress*) block_pointer, void (NSError*, RCTSource*) block_pointer)
__80-[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:]_block_invoke
-[RCTMultipartStreamReader emitChunk:headers:callback:done:]
-[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:]
-[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:]
_CFNetworkHTTPConnectionCacheSetLimit
__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
-[NSBlockOperation main]
__NSOPERATION_IS_INVOKING_MAIN__
-[NSOperation start]
__NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__
__NSOQSchedule_f
_dispatch_block_async_invoke2
_dispatch_client_callout
_dispatch_continuation_pop
_dispatch_async_redirect_invoke
_dispatch_root_queue_drain
_dispatch_worker_thread2
_pthread_wqthread
start_wqthread
Run Code Online (Sandbox Code Playgroud)
这是我的 package.json
{
"name": "Athalens",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"algoliasearch": "^3.30.0",
"lodash": "^4.17.10",
"react": …Run Code Online (Sandbox Code Playgroud)