GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — React 18RC Upgrade not working · Issue #32587 · vercel/next.js

React 18RC Upgrade not working #32587

New issue
Copy link
New issue
Copy link
Closed
Closed
React 18RC Upgrade not working#32587
Copy link
Labels
UpstreamRelated to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).

Description

@adesugbaa
adesugbaa
opened on Dec 16, 2021
Issue body actions

What version of Next.js are you using?

12.0.7

What version of Node.js are you using?

17.2.0

What browser are you using?

Chrome

What operating system are you using?

MacOS Monterey

How are you deploying your application?

Vercel

Describe the Bug

I have an existing application (in production), and wanted to try out the React18 features.

When I upgrade the rear versions using:

yarn add react@rc react-dom@rc

The application refuses to compile/start:

yarn dev                      
yarn run v1.22.17
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /Users/ayorinde/Dev/Git/Others/jtv.nextjs/.env.local
info  - Using the createRoot API for React
warn  - You are using an unsupported prerelease of 'react-dom' which may cause unexpected or broken application behavior. Continue at your own risk.
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /Users/ayorinde/Dev/Git/Others/jtv.nextjs/node_modules/react/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:429:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:683:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.mod._resolveFilename (/Users/ayorinde/Dev/Git/Others/jtv.nextjs/node_modules/next/dist/build/webpack/require-hook.js:171:28)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at getPackagePath (/Users/ayorinde/Dev/Git/Others/jtv.nextjs/node_modules/next/dist/build/webpack-config.js:601:41)
    at Object.getBaseWebpackConfig [as default] (/Users/ayorinde/Dev/Git/Others/jtv.nextjs/node_modules/next/dist/build/webpack-config.js:617:9) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

How do we opt in to React18, and try out the new features?

Expected Behavior

I expect the application to compile, and start accepting/responding to requests.

To Reproduce

Create a next application, and upgrade to React18 following this link

Activity

  1. adesugbaa
    added
    bugIssue was opened via the bug report template.
    on Dec 16, 2021
  2. chuvikovd commented on Dec 18, 2021

    @chuvikovd
    chuvikovd
    on Dec 18, 2021
    More actions

    Experienced same issue. However, works fine with node@16.

    Reacted by Baris Tikir
  3. balazsorban44
    added
    kind: bug
    and removed
    bugIssue was opened via the bug report template.
    on Dec 18, 2021
  4. balazsorban44 commented on Dec 18, 2021

    @balazsorban44
    balazsorban44
    on Dec 18, 2021
    Contributor
    More actions

    This seems to be coming from react itself.

    PR already merged react/react#22783, probably released soon.
    Another potentially relevant PR: react/react#22954

    Good catch BTW, thanks for reporting 👍

  5. balazsorban44
    closed this as completedon Dec 18, 2021
  6. balazsorban44
    added
    UpstreamRelated to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).
    on Dec 18, 2021
  7. balazsorban44 commented on Jan 27, 2022

    @balazsorban44
    balazsorban44
    on Jan 27, 2022
    Contributor
    More actions

    This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

  8. vercel
    locked as resolved and limited conversation to collaborators on Jan 27, 2022
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

    UpstreamRelated to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.