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

Bug: Failed to parse source map #834

Closed
ghost opened this issue Feb 20, 2024 · 10 comments · Fixed by #835
Closed

Bug: Failed to parse source map #834

ghost opened this issue Feb 20, 2024 · 10 comments · Fixed by #835
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@ghost
Copy link

ghost commented Feb 20, 2024

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: v1.16.2...v1.16.3

@ghost ghost added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Feb 20, 2024
@wangela
Copy link
Member

wangela commented Feb 20, 2024

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.

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

@attali97
Copy link

encountered the same situation when upgrade from 1.16.2 to 1.16.3

@wangela
Copy link
Member

wangela commented Feb 22, 2024

See #825 and upgrade to 1.16.6.

@wangela wangela added duplicate This issue or pull request already exists and removed triage me I really want to be triaged. labels Feb 22, 2024
@wangela wangela closed this as completed Feb 22, 2024
@ghost
Copy link
Author

ghost commented Feb 22, 2024

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

@ghost
Copy link
Author

ghost commented Feb 22, 2024

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
Copy link
Author

ghost commented Feb 22, 2024

grafik

grafik

@usefulthink usefulthink reopened this Feb 22, 2024
@daniele-orlando
Copy link

daniele-orlando commented Feb 22, 2024

Same issue here. v1.16.6

Screenshot 2024-02-22 alle 15 41 10

@usefulthink usefulthink changed the title bug starting with v1.16.3 Bug: Failed to parse source map Feb 22, 2024
@daniele-orlando
Copy link

daniele-orlando commented Feb 22, 2024

@wangela please can you remove the duplicate label? As the issue mentioned by you (#825) is about a different problem.

@usefulthink usefulthink added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed duplicate This issue or pull request already exists labels Feb 22, 2024
usefulthink added a commit to usefulthink/js-api-loader that referenced this issue Feb 23, 2024
This is a full refactoring of the rollup configuration to speed up builds, simplify the configuration prevent warnings and fix an error with the generated source maps.

In detail:
 - refactor: Combine the three non-esm outputs into a single configuration.

 - feat: Enabled source-maps for all build outputs.

 - fix: Use a separate TypeScript configuration (`tsconfig.build.json`) during build. This configuration only compiles the required typescript files and doesn't reproduce the directory structure in the dist-folder (see also the change in package.json). It also now generates source maps correctly (googlemaps#834).

 - chore: Moved `fast-deep-equal` from dependencies to devDependencies. It is a very small function, and it has always been bundled in all of our outputs, so it's not actually required at runtime. This will be changed in the next major release.

 fixes googlemaps#834
@dzfweb
Copy link

dzfweb commented Jun 11, 2024

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

@raimuhammad26
Copy link

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.

github-actions bot pushed a commit that referenced this issue Jun 26, 2024
This is a full refactoring of the rollup configuration to speed up builds, simplify the configuration prevent warnings and fix an error with the generated source maps.

In detail:
 - refactor: Combine the three non-esm outputs into a single configuration.

 - feat: Enabled source-maps for all build outputs.

 - fix: Use a separate TypeScript configuration (`tsconfig.build.json`) during build. This configuration only compiles the required typescript files and doesn't reproduce the directory structure in the dist-folder (see also the change in package.json). It also now generates source maps correctly (#834).

 - chore: Moved `fast-deep-equal` from dependencies to devDependencies. It is a very small function, and it has always been bundled in all of our outputs, so it's not actually required at runtime. This will be changed in the next major release.

 fixes #834 3436cc0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants