Skip to content

react-native create new project error #260

Closed

Description

@rangav

Environment

React Native Environment Info:
    System:
      OS: macOS 10.14.3
      CPU: (4) x64 Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz
      Memory: 50.55 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.12.0 - /usr/local/bin/node
      Yarn: 1.15.2 - /usr/local/bin/yarn
      npm: 6.7.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 23, 26, 28
        Build Tools: 23.0.1, 28.0.3
        System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5314842
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react-native: 0.59.1 => 0.59.1 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Description

react-native new project create error

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:125:11)
    at Object.join (path.js:1036:7)
    at isProjectUsingYarn (/Users/ranga/Documents/Projects/testing348333/node_modules/@react-native-community/cli/build/tools/yarn.js:101:51)
    at shouldUseYarn (/Users/ranga/Documents/Projects/testing348333/node_modules/@react-native-community/cli/build/tools/PackageManager.js:36:39)
    at Object.install (/Users/ranga/Documents/Projects/testing348333/node_modules/@react-native-community/cli/build/tools/PackageManager.js:44:10)
    at generateProject (/Users/ranga/Documents/Projects/testing348333/node_modules/@react-native-community/cli/build/commands/init/init.js:111:18)
    at Object.init (/Users/ranga/Documents/Projects/testing348333/node_modules/@react-native-community/cli/build/commands/init/init.js:94:3)
    at run (/usr/local/lib/node_modules/react-native-cli/index.js:302:7)
    at createProject (/usr/local/lib/node_modules/react-native-cli/index.js:249:3)
    at init (/usr/local/lib/node_modules/react-native-cli/index.js:200:5)

Reproducible Demo

Create a new project to see the error
react-native init testing348333

Activity

  1. changed the title [-]react-native new project create error[/-] [+]react-native create new project error[/+] on Mar 22, 2019
  2. SoldierCorp commented on Mar 23, 2019

    @SoldierCorp

    Hi!

    You closed this but you didn't released a new version so we can pull it in our locals.

  3. thymikee commented on Mar 23, 2019

    @thymikee
    Member

    I'm pretty sure I released 1.5.1 and tested it works today. Can you share some details? Maybe your package manager use cached version somehow?

  4. fpersico commented on Mar 23, 2019

    @fpersico

    @thymikee you forgot to release a version for v2 i mean v2.0.1.

  5. thymikee commented on Mar 23, 2019

    @thymikee
    Member

    2.0 should not be used by RN 0.59. If it is, that's a bug

  6. thymikee commented on Mar 23, 2019

    @thymikee
    Member

    Just confirmed it's not used there. Also 2.0 didn't get the commit that broke this. I'm curious about your environment and how you run init

  7. SoldierCorp commented on Mar 23, 2019

    @SoldierCorp

    @thymikee It was the cache, now it's working!

    Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions