React-native: Can't use react-native init to create new project

Created on 4 Jul 2018  路  8Comments  路  Source: facebook/react-native

I can't use command
react-native init {someproject}
to create a new project to work. this is what appear in the console

import type {CommandT} from './commands';
^^^^^^

SyntaxError: Unexpected token import
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (module.js:613:28)
at Module._compile (D:WorksProject2node_modulespirateslibindex.js:91:24)
at Module._extensions..js (module.js:660:10)
at Object.newLoader [as .js] (D:WorksProject2node_modulespirateslibindex.js:96:7)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)

Ran Commands Locked

Most helpful comment

All 8 comments


We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

Please make use of the bug report template to let us know about a reproducible bug or regression in the core React Native library.

If you'd like to start a discussion, check out https://discuss.reactjs.org or follow the discussion template.

Same problem here.

Same problem here.

Same problem

same isssue here

{
  "name": "location",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start"
  },
  "dependencies": {
    "react-native": "0.56.0"
  }
}

@dhthong92 Thanks a lot

I opened a new issue based on issue template.
https://github.com/facebook/react-native/issues/20086

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grabbou picture grabbou  路  3Comments

despairblue picture despairblue  路  3Comments

aniss picture aniss  路  3Comments

anchetaWern picture anchetaWern  路  3Comments

axelg12 picture axelg12  路  3Comments