日別アーカイブ: 2018年7月11日

Windows 10でreact-native initのエラー対処

詳しくはこちら

WIndows 10で、以下のコマンドで初期化しようとした場合に

1
react-native init AwesomeProject

以下のエラーになる場合がある(react-native: 0.56.0の場合)

1
2
3
4
import type {CommandT} from './commands';
^^^^^^
 
SyntaxError: Unexpected token import

対処としては前のバージョンを指定して初期化する。

1
react-native init --version="0.55.4" AwesomeProject