小编use*_*650的帖子

构建反应本机应用程序时找不到模块“babel/plugin-proposal-nullish-coalescing-operator”

我正在尝试运行我的反应本机应用程序,但我不断收到以下错误。

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)

babeljs react-native

5
推荐指数
0
解决办法
3304
查看次数

标签 统计

babeljs ×1

react-native ×1