LoginSignup
11
4

More than 3 years have passed since last update.

create-react-app が Node.js 12.0.0 で動かない

Last updated at Posted at 2019-05-26

問題

次のように create-react-app を動かそうとした(環境は Mac):

$ npx create-react-app hello-react --typescript
$ cd hello-react
$ yarn start

しかしエラー:

#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

原因

ググったところ同様の問題を扱った issue を見つけ、そのなかで次のコメントを見つけた:

If anyone is using Node.js 12.0.0, try to upgrade to 12.1.0. For me it is now working.

ちょうど 12.0.0 をインストールしていたので、12.1.0 にアップグレードすることにした。

解決

  1. まず、Node.js 12.1.0 をインストールして、バージョンを 12.1.0 に切り替える(ここの詳細は別の記事に書きました
  2. yarn をグローバルにインストールし直す(npm install -g yarn
  3. プロジェクトルート(hello-react)に移動し、node_modules を削除して、yarn install し直す(一応)
  4. yarn start し直す

これで無事アプリが起動!

スクリーンショット 2019-05-26 22.32.22.png

11
4
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
11
4