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 using @sniptt/monads in React, I am getting a warning indicating that source maps are pointing to non-existing files.
Expected behavior
I expected the library to compile without any compiler warnings.
Actual behavior
When compiling, the React compiler (to be more precise: source-maps-loader) prints multiple warnings, all looking similar to the following:
WARNING in ./node_modules/@sniptt/monads/build/result/result.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '[Path to my project]\node_modules\@sniptt\monads\lib\result\result.ts' file: Error: ENOENT: no such file or directory, open '[Path to my project]\node_modules\@sniptt\monads\lib\result\result.ts'
Potential reason
It seems like the source maps are pointing to a "lib" folder that does not exist. For instance, build/result/result.js.map has the following content:
Thus, this source map is trying to reference (root)/lib/result/result.ts. However, the lib/ folder does not exist since it is not part of the package; only the build/ folder is currently included in package.json:
When using
@sniptt/monads
in React, I am getting a warning indicating that source maps are pointing to non-existing files.Expected behavior
I expected the library to compile without any compiler warnings.
Actual behavior
When compiling, the React compiler (to be more precise:
source-maps-loader
) prints multiple warnings, all looking similar to the following:Potential reason
It seems like the source maps are pointing to a "lib" folder that does not exist. For instance,
build/result/result.js.map
has the following content:Thus, this source map is trying to reference
(root)/lib/result/result.ts
. However, thelib/
folder does not exist since it is not part of the package; only thebuild/
folder is currently included inpackage.json
:https://github.com/sniptt-official/monads/blob/fe0b45709cf3efa0a82b2602c3ef619553fbe21e/package.json#L11-L13
Environment
@sniptt/monads
: Version0.5.10
18.2.0
.The text was updated successfully, but these errors were encountered: