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

Source map errors #785

Closed
justrealmilk opened this issue Apr 8, 2022 · 7 comments · Fixed by #788
Closed

Source map errors #785

justrealmilk opened this issue Apr 8, 2022 · 7 comments · Fixed by #788

Comments

@justrealmilk
Copy link

Unsure how to even describe these errors.

It's a TypeScript React project. These errors are displayed by webpack's dev server.

WARNING in ./node_modules/entities/lib/esm/decode.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'G:\my_project\node_modules\entities\src\decode.ts' file: Error: ENOENT: no such file or directory, open 'G:\my_project\node_modules\entities\src\decode.ts'
 @ ./node_modules/entities/lib/esm/index.js 1:0-70 77:13-29 80:11-21 83:9-18 101:13-23 104:11-27 107:9-18 139:0-140:182 139:0-140:182 139:0-140:182 139:0-140:182 139:0-140:182 139:0-140:182 139:0-140:182 139:0-140:182 139:0-140:182


WARNING in ./node_modules/entities/lib/esm/decode_codepoint.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'G:\my_project\node_modules\entities\src\decode_codepoint.ts' file: Error: ENOENT: no such file or directory, open 'G:\my_project\node_modules\entities\src\decode_codepoint.ts'
 @ ./node_modules/entities/lib/esm/decode.js 3:0-85 5:0-76 5:0-76 70:17-32
  @ ./node_modules/entities / lib / esm / index.js 1: 0 - 70 77: 13 - 29 80: 11 - 21 83: 9 - 18 101: 13 - 23 104: 11 - 27 107: 9 - 18 139: 0 - 140: 182 139: 0 - 140: 182 

WARNING in ./node_modules/entities/lib/esm/encode-trie.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'G:\my_project\node_modules\entities\src\encode-trie.ts' file: Error: ENOENT: no such file or directory, open 'G:\my_project\node_modules\entities\src\encode-trie.ts'
 @ ./node_modules/entities/lib/esm/encode.js 1:0-66 27:47-59 47:9-25 58:9-25
 @ ./node_modules/entities/lib/esm/index.js 2:0-113 122:46-56 123:51-66 124:46-56 128:13-31 131:11-21 135:9-18 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74


WARNING in ./node_modules/entities/lib/esm/encode.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'G:\my_project\node_modules\entities\src\encode.ts' file: Error: ENOENT: no such file or directory, open 'G:\my_project\node_modules\entities\src\encode.ts'
 @ ./node_modules/entities/lib/esm/index.js 2:0-113 122:46-56 123:51-66 124:46-56 128:13-31 131:11-21 135:9-18 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74 137:0-138:74


WARNING in ./node_modules/entities/lib/esm/generated/decode-data-html.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'G:\my_project\node_modules\entities\src\generated\decode-data-html.ts' file: Error: ENOENT: no such file or directory, oModule Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'G:\my_project\node_modules\entities\src\index.ts' file: Error: ENOENT: no such file or directory, open 'G:\my_project\node_modules\entities\src\index.ts'
@fb55
Copy link
Owner

fb55 commented Apr 10, 2022

Thanks for reporting this! Turns out that the source maps that shipped with this package are largely useless, as they require the original source files to be present in the package. I found a way to point the source maps to the repo's source files, but am still unsure if I shouldn't just remove the source maps in the first place.

@justrealmilk — curious to hear your take. Are source maps from packages something you'd like to have?

@justrealmilk
Copy link
Author

Thank you for the consideration but I'm unsure of the benefits (I know nothing ^_^). If you think they provide a benefit, then why not I guess

@fb55
Copy link
Owner

fb55 commented Apr 10, 2022

I have published entities@4.3.0 with the fix described above. @justrealmilk it would be awesome if you could verify if this fixed your issue!

@justrealmilk
Copy link
Author

WARNING in ./node_modules/entities/lib/esm/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'G:\my_project\node_modules\entities\lib\esm\https:\raw.githubusercontent.com\fb55\entities\f85d378bc4dbe36a3a7b0f757114d3d71f950d31\src\index.ts' file: Error: ENOENT: no such file or directory, open 'G:\my_project\node_modules\entities\lib\esm\https:\raw.githubusercontent.com\fb55\entities\f85d378bc4dbe36a3a7b0f757114d3d71f950d31\src\index.ts'

@fb55
Copy link
Owner

fb55 commented Apr 10, 2022

🤦 Okay, seems like source-map-loader does not support source files being loaded from a URL. webpack-contrib/source-map-loader#113 seems related.

@justrealmilk
Copy link
Author

🤦 Okay, seems like source-map-loader does not support source files being loaded from a URL. webpack-contrib/source-map-loader#113 seems related.

Unsure if it's appropriate to expect that to get merged any time soon 😅

@justrealmilk
Copy link
Author

This is still an annoying issue heh

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.

2 participants