Skip to content

Can't create new project with 0.61 #74

@gianpaj

Description

@gianpaj

Bug

The installation command from the Readme file doesn't work:

$ npx react-native init RN61ts --template react-native-template-typescript
Using yarn v1.17.3
Installing react-native...
...
success Saved lockfile.
success Saved 411 new dependencies.
info Direct dependencies
└─ react-native@0.61.0
...
✨  Done in 16.48s.
info Setting up new React Native app in /Users/gianfranco/temp/RN61ts
info Fetching template react-native-template-react-native-template-typescript...
yarn add v1.17.3
[1/4] 🔍  Resolving packages...
warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > left-pad@1.3.0: use String.prototype.padStart()
error An unexpected error occurred: "https://registry.yarnpkg.com/react-native-template-react-native-template-typescript: Not found".

This doesn't give an error but it creates a folder called template with, for example, the App.tsx file:

$ npx react-native init RN61ts --template typescript
$ ls RN61ts
ls RN61ts
App.js             __tests__          babel.config.js    metro.config.js    template
LICENSE            android            index.js           node_modules       template.config.js
README.md          app.json           ios                package.json       yarn.lock
$ ls RN61ts/template
App.tsx         android         babel.config.js ios             package.json
__tests__       app.json        index.js        metro.config.js

Maybe it's related that the template hasn't been upgraded to 0.61?

"dependencies": {
"react": "16.8.6",
"react-native": "0.60.5"
},

Environment info

React native info output:

$ npx react-native info
System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 334.95 MB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.11.3 - ~/.nvm/versions/node/v10.16.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 23, 24, 25, 26, 27, 28
      Build Tools: 20.0.0, 21.1.2, 22.0.1, 23.0.3, 25.0.3, 26.0.2, 27.0.0, 27.0.3, 28.0.2, 28.0.3, 29.0.0, 29.0.0, 29.0.2
      System Images: android-22 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5791312
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.0 => 0.61.0
  npmGlobalPackages:
    react-native-autocomplete-dropdown: 1.0.0
    react-native-cli: 2.0.1
    react-native-rename: 2.4.0
    react-native-simple-radio-button: 2.7.3

FYI the main RN documentation website says to use the react-native global cli.
Is the README file in this repo outdated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions