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

Not working with react-refresh 0.12.0 #619

Closed
Jack-Works opened this issue Mar 30, 2022 · 4 comments
Closed

Not working with react-refresh 0.12.0 #619

Jack-Works opened this issue Mar 30, 2022 · 4 comments

Comments

@Jack-Works
Copy link
Contributor

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './runtime.js' is not defined by "exports" in react-refresh/package.json

image

@pierrecholhot
Copy link

In my setup this error started showing after upgrading react-scripts to 5.0.0.

Taken from TROUBLESHOOTING.md, I was able to circumvent it using:

npm install --legacy-peer-deps

node v16.9.1 – npm v7.21.1 – react-scripts v5.0.0

@ntucker
Copy link

ntucker commented Mar 30, 2022

This is fixed in #576 but we are all waiting on a version with this fix to be published.

@kimbaudi
Copy link

I also got the following error:

ERROR in ./src/index.tsx
Module build failed (from ./node_modules/@pmmmwh/react-refresh-webpack-plugin/loader/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './runtime.js' is not defined by "exports" in react-refresh-error\node_modules\react-refresh\package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:692: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.resolve (node:internal/modules/cjs/helpers:108:19)
    at Object.<anonymous> (react-refresh-error\node_modules\@pmmmwh\react-refresh-webpack-plugin\loader\index.js:20:4)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

ERROR in ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js 4:23-58
Module not found: Error: Package path ./runtime.js is not exported from package eact-refresh-error\node_modules\react-refresh (see exports field in react-refresh-error\node_modules\react-refresh\package.json)

looking forward to the next release w/ the fix 🙏 😄

@pmmmwh
Copy link
Owner

pmmmwh commented Apr 4, 2022

Released in 0.5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants