Skip to content

[FIXED] Unable to create new RN 0.72 project with Node 16 again #40797

Closed

Description

@jonthysell

Description

@react-native/normalize-colors@0.74.0 was just published, breaking 0.72.5 with Node 16 again. Same problem as #39692.

React Native Version

0.72.5

Output of npx react-native info

Can't create a project, so can't run info.

Steps to reproduce

npx --yes react-native@0.72.5 init testcli72 --template react-native@0.72.5

See #39692.

Snack, screenshot, or link to a repository

image

Activity

  1. github-actions commented on Oct 11, 2023

    @github-actions
    ⚠️ Missing Reproducible Example
    ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
    • If your bug is UI related: a Snack
    • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
  2. added
    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.
    on Oct 11, 2023
  3. Jore commented on Oct 12, 2023

    @Jore

    Yeah, I'm having the same issue. :(

  4. robhogan commented on Oct 12, 2023

    @robhogan
    Collaborator

    Thanks for reporting - we're about to publish an update to normalize-colors removing the Node 18 restriction, and tighten the transitive dependency via react-native-deprecated-prop-types.

    Workaround

    As a mitigation, you can init the project using Node 18, add a resolutions field to your package.json, and then drop back to Node 16.

    nvm use 18
    npx --yes react-native@0.72.5 init testcli72 --template react-native@0.72.5 --skip-install
    cd testcli72

    Add to your new package.json as a top-level field (docs: resolutions):

    "resolutions": {
      "@react-native/normalize-colors": "^0.72.0"
    },
    nvm use 16
    yarn install
    yarn start
  5. pinned this issue on Oct 12, 2023
  6. added
    Impact: RegressionDescribes a behavior that used to work on a prior release, but stopped working recently.
    and removed
    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.
    on Oct 12, 2023
  7. huntie commented on Oct 12, 2023

    @huntie
    Collaborator

    Resolved — please retry creating new React Native projects

    We've just published @react-native/normalize-colors@0.74.1, which removes the Node 18 constraint and should resolve this issue.

    • Please retry npx react-native init from now, and it should work.
    • In existing recently created projects, you should be able to remove the "resolutions" workaround (and/or delete yarn.lock and reinstall).

    We're sorry this issue happened! Thanks @robhogan for actioning changes. We're following up with a more durable fix to eliminate the "*" version specifier from the dependency tree — which will prevent future changes impacting current React Native versions.

  8. changed the title [-]Unable to create new RN 0.72 project with Node 16 again[/-] [+][FIXED] Unable to create new RN 0.72 project with Node 16 again[/+] on Oct 12, 2023
  9. unpinned this issue on Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions