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

unable to upgrade to react 18 #33297

Closed
newbcit opened this issue Jan 14, 2022 · 3 comments
Closed

unable to upgrade to react 18 #33297

newbcit opened this issue Jan 14, 2022 · 3 comments
Labels
Upstream Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).

Comments

@newbcit
Copy link

newbcit commented Jan 14, 2022

Run next info (available from version 12.0.8 and up)

/bin/sh: 1: yarn: not found
/bin/sh: 1: pnpm: not found

Operating System:
  Platform: linux
  Arch: x64
  Version: #51~20.04.1-Ubuntu SMP Fri Jan 7 06:51:40 UTC 2022
Binaries:
  Node: 17.2.0
  npm: 8.0.0
  Yarn: N/A
  pnpm: N/A
Relevant packages:
  next: 12.0.8
  react: N/A
  react-dom: 18.0.0-rc.0

What version of Next.js are you using?

12.0.8

What version of Node.js are you using?

17.2

What browser are you using?

chrome, firefox

What operating system are you using?

ubuntu

How are you deploying your application?

I am not deploying it yet. Working in dev environment

Describe the Bug

When I run npm run dev after installing rc version of react and react-dom I keep getting following message:

ready - started server on 0.0.0.0:3000, url: http://localhost:3000

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /home/brum/Documents/xcode/suspense/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 (/home/brum/Documents/xcode/suspense/node_modules/next/dist/build/webpack/require-hook.js:179:28)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at getPackagePath (/home/brum/Documents/xcode/suspense/node_modules/next/dist/build/webpack-config.js:548:41)
at Object.getBaseWebpackConfig [as default] (/home/brum/Documents/xcode/suspense/node_modules/next/dist/build/webpack-config.js:564:9)`

{ code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' }

Expected Behavior

successfully run dev server on localhost:3000

To Reproduce

npm install next@latest react@rc react-dom@rc --legacy-peers-deps
npm run dev

@newbcit newbcit added the bug Issue was opened via the bug report template. label Jan 14, 2022
@balazsorban44
Copy link
Member

This is an issue with React: #32587 (comment)

Will be fixed in their next release:

facebook/react#22954 (comment)

@balazsorban44 balazsorban44 added Upstream Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.). and removed bug Issue was opened via the bug report template. labels Jan 15, 2022
@newbcit
Copy link
Author

newbcit commented Jan 20, 2022

Thank you. When do you think will be the next release on?

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Upstream Related to using Next.js with a third-party dependency. (e.g., React, UI/icon libraries, etc.).
Projects
None yet
Development

No branches or pull requests

2 participants