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

ModuleNotFoundError: Module not found: Error: Can't resolve 'globalthis/polyfill' #97

Open
mathiasfc opened this issue Apr 1, 2021 · 3 comments

Comments

@mathiasfc
Copy link

mathiasfc commented Apr 1, 2021

Recently I'm having this issue in the build of my project with nextjs, does anyone have any idea what it could be?

ModuleNotFoundError: Module not found: Error: Can't resolve 'globalthis/polyfill' in '/home/unbox/Documents/github/with-styled-components-app/node_modules/payment/lib'

How to reproduce

image

"dependencies": {
    "next": "latest",
    "react": "^16.8.0",
    "react-credit-cards": "^0.8.3",
    "react-dom": "^16.8.0",
    "react-is": "^16.8.0",
    "styled-components": "^5.0.0"
  },

Update:

payment latest release 2.4.1 is causing this.
related PR in payment repo

setting the version manually to the previous one, works normally

@richardkeller411
Copy link

I have same issue. Will help review.

@richardkeller411
Copy link

https://github.com/jessepollak/payment This is the issue for sure. They are adding globalthis as a dependency and other items. Will need to play around and correct.

@lu-henriquec
Copy link

I have issue.

ModuleNotFoundError: Module not found: Error: Can't resolve 'payment' in '/Users/lucashenrique/Documents/rcc-test/node_modules/react-credit-cards/es'

https://github.com/jessepollak/payment/releases/tag/v2.4.2
They updated, globalthis was added as devDependencies.

I think that in the code it isn't necessary to import payment module.
import Payment from 'payment';

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

3 participants