-
Notifications
You must be signed in to change notification settings - Fork 644
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
Error: Cannot find module 'core-js/modules/es.string.replace.js' #1194
Comments
If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.@abdirahmn1 Thank you for opening this issue. 🙏
This is an automated message, feel free to ignore. |
Same error on node v20 and osx |
Found a solution? |
You can simply |
Another solution is to add the following code to the
|
Why don't maintainers create patch version to fix this issue? It is so discouragement to face error at the first time rather than getting response for GOOGLE MAP official sdk. |
Feel free to contribute. It's open source :) |
This worked for me |
"Technically" this is a dupe of #1182, which was closed, but I'd recommend keeping this one open until the upstream releases are fixed, so that it's easier for folks to find this, and not open additional new issues. In any case, despite the fact that google-maps-services-js is featured prominently in the call stack, 1.0.33 release requires core-js but states no dependency #528 is a little closer to the root cause, and might be a good place for additional upvotes and commentary. In terms of @justAsascha's recommendation to make a contribution since it's Open Source, I took a full day to take a crack at it, and if I tracked it down correctly, I believe the issue is that in js-url-signature, babel is determining that core-js is required for a couple of polyfills (including es.string.replace) for older browser support. I removed core-js from the .babelrc and it all worked great FOR ME (Nodejs 20 environment), but that's pretty clearly a build config/release business decision more than a code fix. In my own personal opinion, completely removing the core-js dependency is slightly preferable, since older browsers could still use older versions explicitly, and the rest of us would have one less dependency, but that's definitely a business decision. I conjecture someone could alternately move core-js from devDependencies to dependencies in the package.json for js-url-signature; but I didn't try that. If anyone does, tag me in the PR and I'm happy to pull it down and test here, comment, etc. Or if I run out of stuff to do and can spare another day (ha!) I'll take another crack at it. Based on 1.0.33 release requires core-js but states no dependency #528, it sounds like folks are aware of it, but not sure who owns that decision. I recommend upvoting there. |
This answer works if you don't want to install a specific version as suggested above.
Thanks to Gustavo Villarroel C from Stack Overflow! |
There has been a PR to fix this issue in the underlying package here since early May. Unfortunately, there appears to be limited activity in that package compared to this one. I would encourage giving this Issue a 👍 so that a review of that PR gets prioritized, as this is breaking the upgrade path for this library for some folks. (Edit: I meant to give the 👍 to the first post here - the issue itself. Google has in the past said they prioritize by those emoji on the top post.) |
👍 |
for deno users - |
Looks like a new @googlemaps/url-signature (1.0.35) was released last night, but appears it did not include @zackdotcomputer's PR and still shows the issue in my environment. 1.0.33 release requires core-js but states no dependency #528:
From package-lock.json:
|
Only way I've been able to get this to deploy is by switching to the deprecated Google Maps
I'm not sure if this is advisable, but wanted to add this data point. Very interested in better understanding what's going on here |
FYI - I'm no longer seeing the error in my environment as of the 1.0.36 release of @googlemaps/url-signature From my latest package-lock.json:
Cross-posted from 1.0.33 release requires core-js but states no dependency #528:
|
Am encountering the error code
MODULE_NOT_FOUND
after updating the package to latest/@3.4.0, this didn't exist about 3 weeks ago. It seems to be a problem withcore-js
missing, temporarilly installingcore-js
seems to solve the problem.Environment details
Steps to reproduce
Code example
Stack trace
Hopefully this gets fixed soon. 👍
The text was updated successfully, but these errors were encountered: