Skip to content

RNW CLI doesn't detect the project name for an Expo project #2808

@jonthysell

Description

@jonthysell

Environment

  1. react-native -v:
react-native-cli: 2.0.1
react-native: 0.59.8
  1. npm ls rnpm-plugin-windows:
`-- rnpm-plugin-windows@0.2.11
  1. npm ls react-native-windows:
`-- react-native-windows@0.59.0-vnext.95
  1. node -v:
v10.15.3
  1. npm -v:
6.10.1

Then, specify:

  • Target Platform Version(s): 10.0.18362

  • Target Device(s): Desktop

  • Visual Studio Version: 2017

  • Build Configuration: Debug

Steps to Reproduce

Starting with an app created using expo-cli. I want to eject into a plain RN project and add a RNW vnext target using rnpm-plugin-windows.

  1. expo eject
  2. Select "plain" RN project
  3. User is prompted for the name of the XCode/Android studio project.
  4. react-native windows --template vnext

Expected Behavior

I am prompted for the name of the project for VS, or the command parses out the project name automatically.

Actual Behavior

The command fails with an error specifying that there must be a project name. It expects that "name" entry in the package.json that can be parsed out. However in expo ejected projects, the project name is in app.json.

Workaround

Manually add the "name" entry in the package.json before running react-native windows --template vnext.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions