Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use react-native init to create new project #20037

Closed
Foxhound401 opened this issue Jul 4, 2018 · 8 comments
Closed

Can't use react-native init to create new project #20037

Foxhound401 opened this issue Jul 4, 2018 · 8 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@Foxhound401
Copy link

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:\Works\Project2\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (module.js:660:10)
at Object.newLoader [as .js] (D:\Works\Project2\node_modules\pirates\lib\index.js:96:7)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)

@react-native-bot
Copy link
Collaborator

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.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. 📋No Template labels Jul 4, 2018
@arfaWong
Copy link

arfaWong commented Jul 5, 2018

Same problem here.

1 similar comment
@leehongqiang
Copy link

Same problem here.

@dhthong92
Copy link

Same problem

@AmeerHamzaRiaz
Copy link

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
Copy link

Here's workaround, this is a known bug in RN 0.56
https://stackoverflow.com/questions/51178688/error-creating-new-react-native-project

@Edison4mobile
Copy link

@dhthong92 Thanks a lot

@salmanfarisvp
Copy link

I opened a new issue based on issue template.
#20086

@facebook facebook locked as resolved and limited conversation to collaborators Jul 18, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants