3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

React Native新プロジェクト作成で@babel/runtimeに関するエラーが発生する

Posted at

概要

React Nativeを使って新規プロジェクトを作成し、iOS向けにビルドしようとしたが失敗した。
解決方法が乗ったissueを見つけたためメモを残しておく。

実行環境

  • node v10.9.0
  • npm v6.2.0
  • watchman 4.9.0

実行したもの

$ npm install -g react-native-cli
$ react-native init SampleApp
$ cd SampleApp
$ react-native run-ios
=> エラー発生

エラー内容

Module `@babel/runtime/helpers/interoprequireDefault` does not exist in the Haste module map
スクリーンショット 2018-09-29 1.51.04.png

解決方法

作成したプロジェクト直下で以下を実行する

$ npm add @babel/runtime
$ npm install

これを実行したのちに

$ react-native run-ios

を実行するとビルドに成功した

参考

Module @babel/runtime/helpers/interopRequireDefault does not exist in the Haste module map · Issue #21310 · facebook/react-native

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?