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

Getting Error after updating to 0.1.11. (0.1.9 was working fine). #10

Open
mr-tm opened this issue Jul 26, 2024 · 2 comments
Open

Getting Error after updating to 0.1.11. (0.1.9 was working fine). #10

mr-tm opened this issue Jul 26, 2024 · 2 comments

Comments

@mr-tm
Copy link

mr-tm commented Jul 26, 2024

Seems to be error for Expo/NextJS projects which have packages that depends on this library.

Basically, compiler started to fail after 0.1.10-0.1.11 update. (0.1.9 was working fine)

Module parse failed: Cannot use 'import.meta' outside a module (99:16)
|                 // still a Refresh Boundary later.
|                 // @ts-ignore importMeta is replaced in the loader
>                 import.meta.webpackHot.accept();
|                 // This field is set when the previous version of this module was a
|                 // Refresh Boundary, letting us know we need to check for invalidation or

Import trace for requested module:
../../node_modules/react-native-paper/node_modules/use-latest-callback/lib/src/index.js
../../node_modules/react-native-paper/node_modules/use-latest-callback/esm.mjs
../../node_modules/react-native-paper/lib/module/components/Banner.js
../../node_modules/react-native-paper/lib/module/index.js
 GET / 500 in 111ms
 ⨯ ../../node_modules/react-native-paper/node_modules/use-latest-callback/lib/src/index.js
Module parse failed: Cannot use 'import.meta' outside a module (99:16)
|                 // still a Refresh Boundary later.
|                 // @ts-ignore importMeta is replaced in the loader
>                 import.meta.webpackHot.accept();
|                 // This field is set when the previous version of this module was a
|                 // Refresh Boundary, letting us know we need to check for invalidation or

Import trace for requested module:
../../node_modules/react-native-paper/node_modules/use-latest-callback/lib/src/index.js
../../node_modules/react-native-paper/node_modules/use-latest-callback/esm.mjs
../../node_modules/react-native-paper/lib/module/components/Banner.js
../../node_modules/react-native-paper/lib/module/index.js

@mr-tm
Copy link
Author

mr-tm commented Jul 26, 2024

Putting this override in package.json, fixes the issue.

"overrides": {
    "react-native-paper": {
      "use-latest-callback": "0.1.9"
    }
  },

@mr-tm mr-tm changed the title Error after updated to 0.1.11. (0.1.9 was working fine) Getting Error after updating to 0.1.11. (0.1.9 was working fine). Jul 26, 2024
@satya164
Copy link
Owner

satya164 commented Jul 26, 2024

Please share a repro. Though this looks like a bug in Next.js

Related: vercel/next.js#35110

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

No branches or pull requests

2 participants