js-api-loader icon indicating copy to clipboard operation
js-api-loader copied to clipboard

Bug: Failed to parse source map

Open ghost opened this issue 1 year ago • 8 comments

Environment details

Steps to reproduce

  1. install v1.16.3
  2. build your project with react-scripts
  3. 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

ghost avatar Feb 20 '24 12:02 ghost

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:

This is an automated message, feel free to ignore.

wangela avatar Feb 20 '24 12:02 wangela

encountered the same situation when upgrade from 1.16.2 to 1.16.3

attali97 avatar Feb 20 '24 22:02 attali97

See #825 and upgrade to 1.16.6.

wangela avatar Feb 22 '24 00:02 wangela

The same problem still exists with 1.16.6 @wangela. With "starting with 1.16.3" I mean, that it still exists.

ghost avatar Feb 22 '24 09:02 ghost

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.

ghost avatar Feb 22 '24 09:02 ghost

grafik

grafik

ghost avatar Feb 22 '24 09:02 ghost

Same issue here. v1.16.6

Screenshot 2024-02-22 alle 15 41 10

daniele-orlando avatar Feb 22 '24 14:02 daniele-orlando

@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.

daniele-orlando avatar Feb 22 '24 14:02 daniele-orlando

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)]

dzfweb avatar Jun 11 '24 19:06 dzfweb

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.

raimuhammad26 avatar Jun 16 '24 21:06 raimuhammad26