无法从index.js解析module@babel/time/helpers/interopRequireDefault [英] Unable to resolve module @babel/runtime/helpers/interopRequireDefault from index.js

查看:17
本文介绍了无法从index.js解析module@babel/time/helpers/interopRequireDefault的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚克隆了此存储库:react-native-paper

但是当我在根目录上运行时:

$ yarn install

我收到以下警告:

D:
eact-native-paper (master) (react-native-paper@2.4.0)
λ yarn install
yarn install v1.13.0
[1/4] Resolving packages...
warning Resolution field "babel-core@7.0.0-bridge.0" is incompatible with requested version "babel-core@^6.26.0"
warning Resolution field "babel-core@7.0.0-bridge.0" is incompatible with requested version "babel-core@^6.26.0"
warning Resolution field "babel-core@7.0.0-bridge.0" is incompatible with requested version "babel-core@^6.0.0"
warning Resolution field "babel-core@7.0.0-bridge.0" is incompatible with requested version "babel-core@^6.0.0"
warning Resolution field "babel-core@7.0.0-bridge.0" is incompatible with requested version "babel-core@^6.7.2"

那么,当我这样做时:

$ cd example
$ yarn install

我得到以下带有更多警告的输出:

yarn install v1.13.0
[1/4] Resolving packages...
warning Resolution field "create-react-context@0.2.3" is incompatible with requested version "create-react-context@0.2.2"
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/traveling-fastlane-darwin@1.5.0: The platform "win32" is incompatible with this module.
info "@expo/traveling-fastlane-darwin@1.5.0" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-darwin-ia32@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-darwin-ia32@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-darwin-ia32@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-darwin-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-darwin-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-freebsd-ia32@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-freebsd-ia32@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-freebsd-ia32@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-freebsd-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-freebsd-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-arm@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-linux-arm64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-arm64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-arm64@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-linux-ia32@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-ia32@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-linux-ia32@2.2.8: The CPU architecture "x64" is incompatible with this module.
info @expo/ngrok-bin-linux-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-linux-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-sunos-x64@2.2.8: The platform "win32" is incompatible with this module.
info "@expo/ngrok-bin-sunos-x64@2.2.8" is an optional dependency and failed compatibility check. Excluding it from installation.
info @expo/ngrok-bin-win32-ia32@2.2.8-beta.1: The CPU architecture "x64" is incompatible with this module.
info "@expo/ngrok-bin-win32-ia32@2.2.8-beta.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > create-react-context@0.2.3" has unmet peer dependency "prop-types@^15.0.0".
warning " > @expo/vector-icons@8.0.0" has unmet peer dependency "expo-font@^1.0.0".
warning "expo > react-native-reanimated@1.0.0-alpha.10" has incorrect peer dependency "react@16.0.0-alpha.6".
warning "expo > react-native-reanimated@1.0.0-alpha.10" has incorrect peer dependency "react-native@^0.44.1".
warning "expo > babel-preset-expo > @babel/plugin-proposal-decorators@7.1.2" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > @babel/plugin-proposal-decorators > @babel/plugin-syntax-decorators@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-export-default-from@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-syntax-dynamic-import@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-syntax-export-default-from@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0". warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-arrow-functions@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-block-scoping@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-classes@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-computed-properties@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-destructuring@7.1.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-exponentiation-operator@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-for-of@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-function-name@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-literals@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-object-assign@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-parameters@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-react-display-name@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-react-jsx@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-react-jsx-source@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0". warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-regenerator@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-runtime@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-shorthand-properties@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-spread@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-sticky-regex@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-template-literals@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-typescript@7.1.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-unicode-regex@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-class-properties > @babel/plugin-syntax-class-properties@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-nullish-coalescing-operator > @babel/plugin-syntax-nullish-coalescing-operator@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-object-rest-spread > @babel/plugin-syntax-object-rest-spread@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-optional-catch-binding > @babel/plugin-syntax-optional-catch-binding@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-optional-chaining > @babel/plugin-syntax-optional-chaining@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-flow-strip-types > @babel/plugin-syntax-flow@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-react-jsx > @babel/plugin-syntax-jsx@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-typescript > @babel/plugin-syntax-typescript@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".

我特别注意以上警告,因为当我尝试使用(内部目录:/example):

运行应用程序时
$ yarn start

我在终端上得到以下输出:

There is a new version of expo-cli available (2.6.14).
You are currently using expo-cli 2.3.8
Run `npm install -g expo-cli` to get the latest version
[23:26:13] Starting project at D:
eact-native-paperexample
[23:26:23] Expo DevTools is running at http://localhost:19002
[23:26:23] Opening DevTools in the browser... (press shift-d to disable)
[23:27:19] Starting Metro Bundler on port 19001.
[23:27:32] Successfully ran `adb reverse`. Localhost URLs should work on the connected Android device.
[23:27:36] Tunnel ready.

  exp://192.168.1.194:19000

  [QR CODE HERE]

  To run the app with live reloading, choose one of:
  • Sign in as @napolev in Expo Client on Android or iOS. Your projects will automatically appear in the "Projects" tab.
  • Scan the QR code above with the Expo app (Android) or the Camera app (iOS).
  • Press a for Android emulator.
  • Press e to send a link to your phone with email/SMS.

Press ? to show a list of all available commands.
Logs for your project will appear below. Press Ctrl+C to exit.
[23:28:51] Unable to resolve "@babel/runtime/helpers/interopRequireDefault" from "..srcindex.js"
Building JavaScript bundle [=================================================================================================== ] 99%

我在手机上也得到了以下输出:

Unable to resolve module @babel/runtime/helpers/interopRequireDefault from index.js

如下图所示:

您对如何使此应用程序在移动设备上运行有什么想法吗?

谢谢!

推荐答案

请尝试执行

yarn add @babel/runtime

这篇关于无法从index.js解析module@babel/time/helpers/interopRequireDefault的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆