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
When running recover-source script, the tool throws an ENOENT: no such file or directory error while trying to write a file with a query string in the filename. The issue appears to be caused by an invalid file path due to a query parameter (?6e4c) being appended to the filename.
Error Log
...
...
Source code recovered to checkCircle.svg
Source code recovered to resend.svg
Source code recovered to index.tsx
node:fs:2426
return binding.writeFileUtf8(
^
Error: ENOENT: no such file or directory, open 'C:\Users\Myterious\Downloads\tmp\style.module.css?6e4c'
at Object.writeFileSync (node:fs:2426:20)
at C:\Users\Myterious\AppData\Roaming\npm\node_modules\recover-source\index.js:47:24
at SourceMapConsumer.with (C:\Users\Myterious\AppData\Roaming\npm\node_modules\recover-source\node_modules\source-map\lib\source-map-consumer.js:70:20)
at async handleFile (C:\Users\Myterious\AppData\Roaming\npm\node_modules\recover-source\index.js:33:5) {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\Myterious\\Downloads\\tmp\\style.module.css?6e4c'
}
Node.js v22.14.0
Steps to Reproduce
Install recover-source globally:
`npm install -g recover-source`
Run recover-source on a .map file that contains query parameters in its source paths.
like for example in my case the .map file contains "webpack://myappwapi-web/./src/Components/Pages/stickyChat/CustomMessageItem/CustomContactItem.tsx/style.module.css?6e4c"
Environment
OS: Windows 11
Node.js version: v22.14.0
Possible Fix
The tool should sanitize file paths before writing to disk.
If query parameters exist in the filename, they should be stripped out.
Would appreciate any fix or workaround for this! 🚀
The text was updated successfully, but these errors were encountered:
When running
recover-source
script, the tool throws anENOENT: no such file or directory
error while trying to write a file with a query string in the filename. The issue appears to be caused by an invalid file path due to a query parameter (?6e4c
) being appended to the filename.Error Log
Steps to Reproduce
Install recover-source globally:
Run
recover-source
on a.map
file that contains query parameters in its source paths.like for example in my case the
.map
file contains"webpack://myappwapi-web/./src/Components/Pages/stickyChat/CustomMessageItem/CustomContactItem.tsx/style.module.css?6e4c"
Environment
OS: Windows 11
Node.js version: v22.14.0
Possible Fix
Would appreciate any fix or workaround for this! 🚀
The text was updated successfully, but these errors were encountered: