Bug: Failed to parse source map
Environment details
Steps to reproduce
- install v1.16.3
- build your project with react-scripts
- check the output
Code example
# example
Stack trace
Failed to parse source map from '.../node_modules/@googlemaps/src/index.ts' file: Error: ENOENT: no such file or directory, open '.../node_modules/@googlemaps/src/index.ts'
This didn't occur with v1.16.2. It seems you changed build-related parts of the CI pipeline: https://github.com/googlemaps/js-api-loader/compare/v1.16.2...v1.16.3
If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.
@DanielRuf-bitexpert Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
- Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
- Open a support case - Get 1:1 support in Cloud Console.
- Discord - chat with other developers
- StackOverflow - use the
google-mapstag
This is an automated message, feel free to ignore.
encountered the same situation when upgrade from 1.16.2 to 1.16.3
See #825 and upgrade to 1.16.6.
The same problem still exists with 1.16.6 @wangela. With "starting with 1.16.3" I mean, that it still exists.
The declaration file has nothing to do with the sourcemap error, which is due to the new build setup, which was introduced in 1.16.3.
Same issue here. v1.16.6
@wangela please can you remove the duplicate label? As the issue mentioned by you (https://github.com/googlemaps/js-api-loader/issues/825) is about a different problem.
I just ignored this warning by adding this to webpack. Since this is just a warning, but the code is working good, I decided to supress
config.ignoreWarnings = [(warning) => /@googlemaps/.test(warning.message)]
This issue only arises when I use @googlemaps/js-api-loader in a React app built using the Create React App tool. It does not show if I use it in a React app built using the Vite tool (as of June 2024). Further this shows up as a warning mainly and is not an error for the React app. The warning has kind of a sub-error saying that the file was not found (node_modules@googlemaps\src\index.ts). It's not an error in principle for React.