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

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

Closed
jonthysell opened this issue Oct 11, 2023 · 4 comments
Closed

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

jonthysell opened this issue Oct 11, 2023 · 4 comments
Labels
Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. Needs: React Native Team Attention p: Microsoft Partner: Microsoft Partner Resolution: Fixed A PR that fixes this issue has been merged.

Comments

@jonthysell
Copy link
Contributor

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

@github-actions
Copy link

⚠️ 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.

@github-actions github-actions bot added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Oct 11, 2023
@Jore
Copy link

Jore commented Oct 12, 2023

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

@robhogan
Copy link
Contributor

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

@huntie
Copy link
Member

huntie commented Oct 12, 2023

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.

@huntie huntie closed this as completed Oct 12, 2023
@cortinico cortinico 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 Oct 12, 2023
@cortinico cortinico added the Resolution: Fixed A PR that fixes this issue has been merged. label Oct 12, 2023
facebook-github-bot pushed a commit that referenced this issue Oct 14, 2023
Summary:
To address the root cause of a recurring issue (#40797, #39692) where breaking changes to `react-native/normalize-colors` would be pulled into old versions of `deprecated-react-native-prop-types`, we recently change the dependency in the latter to use a semver range (facebook/react-native-deprecated-modules#27, #40869).

For CI, we generally force `react-native/*` to be resolved only from Verdaccio locally published packages - ie, the current versions at source. The source version (currently `0.74.1`) isn't semver-compatible with `deprecated-react-native-prop-types`'s dependency (`^0.73.0`), so `npm install` was failing in CI with "no package found". We should be getting `0.73.2` from the public registry in this case.

This restores a previous workaround added in #34571 but not updated since facebook/react-native-deprecated-modules#11 meant the dependency was now on the pluralised package. We have no dependency on the old non-plural package any more.

## Changelog:

[INTERNAL] [FIXED] - CI/Verdaccio: Proxy `react-native/normalize-colors` from NPM for the `deprecated-react-native-prop-types` dependency.

Pull Request resolved: #40971

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D50298291

Pulled By: robhogan

fbshipit-source-id: 4bf6503108335ffa52654346d1874c217071ff91
@NickGerleman NickGerleman unpinned this issue Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. Needs: React Native Team Attention p: Microsoft Partner: Microsoft Partner Resolution: Fixed A PR that fixes this issue has been merged.
Projects
None yet
Development

No branches or pull requests

6 participants