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

Failed to parse source map from '****/angular-fetch.ts' file: Error: ENOENT: no such file or directory, open '/***/angular-fetch.ts' #239

Closed
vik-buchinski opened this issue Jul 17, 2024 · 7 comments · Fixed by #271
Assignees

Comments

@vik-buchinski
Copy link

The source maps starting from version 4.0.0 are broken.
What I have in the logs:

`
WARNING in ../../node_modules/flagsmith/index.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/vik.buchinski/Documents/github/utils/angular-fetch.ts' file: Error: ENOENT: no such file or directory, open '/Users/vik.buchinski/Documents/github/utils/angular-fetch.ts'

WARNING in ../../node_modules/flagsmith/index.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/vik.buchinski/Documents/github/utils/async-storage.ts' file: Error: ENOENT: no such file or directory, open '/Users/vik.buchinski/Documents/github/utils/async-storage.ts'

WARNING in ../../node_modules/flagsmith/index.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/vik.buchinski/Documents/github/utils/get-changes.ts' file: Error: ENOENT: no such file or directory, open '/Users/vik.buchinski/Documents/github/utils/get-changes.ts'

WARNING in ../../node_modules/flagsmith/index.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/vik.buchinski/Documents/github/utils/set-dynatrace-value.ts' file: Error: ENOENT: no such file or directory, open '/Users/vik.buchinski/Documents/github/utils/set-dynatrace-value.ts'

WARNING in ../../node_modules/flagsmith/react.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/vik.buchinski/Documents/github/utils/emitter.ts' file: Error: ENOENT: no such file or directory, open '/Users/vik.buchinski/Documents/github/utils/emitter.ts'

webpack compiled with 5 warnings (ee8a793b344e9aca)
`

@matthewelwell
Copy link
Contributor

Hi @vik-buchinski, please can you provide some more information here? Can you confirm exactly what steps you're taking to see these errors, and how they manifest? It seems like they are just warnings at the moment rather than errors so I'm interested to know what effect this is having.

@vik-buchinski
Copy link
Author

@matthewelwell TBH, I didn't test the flagsmith after I saw these warnings. I just reverted to version 3 and warnings disappeared.

But anyway, there is some issue with sourcemaps in the flagsmith library version 4, it can't point from 1 file to another correctly, and instead goes to 2-3 levels higher than the root of the project to look for the .ts files that are located in the node-modules.

@matthewelwell
Copy link
Contributor

Ok, thanks @vik-buchinski - we'll take a look into it.

@abadi-avela
Copy link

@matthewelwell We also ran into this issue , so far I'm able to reproduce on v3.24.0 and v4.1.3. Here's the SSCCE of this issue: https://github.com/abadi-avela/sscce-flagsmith. I hope this helps.

@matthewelwell
Copy link
Contributor

Ok, thanks for this @abadi-avela, we'll take a look into it this week.

@kyle-ssg kyle-ssg linked a pull request Nov 13, 2024 that will close this issue
@kyle-ssg
Copy link
Member

Apologies for the late reply, there is now a PR linked that fixes this. In the meantime, I've published [email protected] which resolves that issue.

@kyle-ssg
Copy link
Member

This is now released under version 8.0.1 🚀

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

Successfully merging a pull request may close this issue.

5 participants