You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do I get this working, any suggestions? The error I'm getting is:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'decode')
at new URLStateMachine (url-state-machine.js:546:1)
at module.exports.basicURLParse (url-state-machine.js:1264:1)
at new URLImpl (URL-impl.js:13:1)
at Object.setup (URL.js:317:1)
at new URL (URL.js:26:1)
at util.js:179:1
at Object.computeSourceURL (util.js:431:1)
at source-map-consumer.js:207:1
at Array.map (<anonymous>)
at source-map-consumer.js:206:1
The JSON looks liek this when I parse the sourcemap in this fashion:
Any help would be greatly appreciated. Thank you.
The text was updated successfully, but these errors were encountered:
@lancejpollard I would test the URL creation in isolation. That seems to be your probably moreso any sourcemap issue. Given the stack track, it looks like this is the URL implementation being used.
If you can make sure your url string works in the constructor, then you just need to validate your replace algorithm produces the exact right string.
Also, be aware that URL will remove the extraneous dot file path: http://task/./node_modules becomes http://task/node_modules.
URL shouldn't touch the path for unknown schemes (like webpack://) which also means it's somewhat important to not change the scheme. Example:
> new URL('webpack://task/./node_modules/foo/bar.js').href
'webpack://task/./node_modules/foo/bar.js'
> new URL('https://task/./node_modules/foo/bar.js').href
'https://task/node_modules/foo/bar.js'
It looks like it's failing right here:
source-map/lib/util.js
Line 181 in 60adcb0
I have this code for parsing the string sourcemap from a JS file, but it's not working:
As you can see in the example, I tried to replace
webpack://
withhttp://
but it didn't seem to help:How do I get this working, any suggestions? The error I'm getting is:
The JSON looks liek this when I parse the sourcemap in this fashion:
Any help would be greatly appreciated. Thank you.
The text was updated successfully, but these errors were encountered: