Open anthwinter opened 5 years ago
@anthw Thanks for the bug report! Would you be able to contribute a minimal repro test case, including a webpack.config.js
with the appropriate project configuration? I'm the only active maintainer right now and it would greatly help with fixing the issue. Thanks!
@davidgoli Sure. I have made https://github.com/anthw/rrule-map-issue
Just run yarn
to get everything installed and then npx webpack
should show the errors
@davidgoli I have done a bit of research and I think the solution might be to add "sourceRoot": "./dist/esm"
to the tsconfig.json
file. I can create a PR to get this change submitted if you like? Is there anything else you would need if I do the PR?
Published v2.6.0.
Hi @davidgoli,
I am using the rrule 2.6.0
and have the same issue.
In the console of the following example you can see a next warning
DevTools failed to parse SourceMap: https://zr81yovxml.codesandbox.io/node_modules/rrule/dist/es5/rrule.js.map
I think I must have test wrong when I thought it was working as I still get the issue as reported too. Sorry!
@davidgoli any news?
@anthwinter This is an issue for me again, can it be reopened?
@joshkostal I originally created a PR #305 to fix this, which was succeeded by #310, so #305 was closed without action.
I thought #310 fixed the issue but hadn't. So maybe #305 could be looked at again @davidgoli ?
My temporary work around for this was to exclude rrule within the loader. Not great, but stops the mass of warnings.
exclude: [path.resolve(__dirname, 'node_modules/rrule')]
Would also love to see or help with a resolution to this. I'm currently suppressing the warnings on my webpack-dev-server using @anthwinter 's solution but would rather not have to do so if that's possible.
Seeing the same warnings as above, using rrule 2.6.4 with webpack 4.44.5 + webpack-dev-server 3.10.2
I'm seeing the same warnings with rrule 2.6.6. I would also like if this issue was resolved.
A release would be welcome.
i have the same issue with Create React App v5 (webpack v5)
"rrule": "^2.6.8", "react-scripts": "5.0.0",
WARNING in ./node_modules/rrule/dist/esm/src/weekday.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from '/Users/rio/Work/edr/node_modules/rrule/src/weekday.ts' file: Error: ENOENT: no such file or directory, open '/Users/rio/Work/edr/node_modules/rrule/src/weekday.ts' @ ./node_modules/rrule/dist/esm/src/index.js 20:0-36 20:0-36 @ ./src/service/schedulesService.js 18:12-27
Having the same issue as @RiodeJaneiroo when I tried to update a react app that uses this library to create-react-app v5.0.0.
The source-map-loader
module is printing the warnings because it is not able to find the source typescript files in the node_modules
folder, which shouldn't be there because only the dist
files are downloaded when we do an install.
I'm not sure how this issue can be resolved save for including the typescript source files in an install or removing sourcemaps in the generated dist.
For the time being I am working around this by pointing my rrule
dependency on a forked branch that disables sourcemaps.
This needs reopening as its still an issue with react-scripts 5.0.0 and rrule 2.6.8.
@chunkily is this forked branch you mentioned public?
I'm having the same issue in create-react-app. Perhaps using inline source maps in the library would mitigate this issue? I had a similar problem while building a library recently, and inline sourcemaps resolved it.
In tsconfig.json
under compilerOptions
{
"compilerOptions": {
...
"sourceMap": true,
"inlineSources": true,
},
...
}
Same issue here with
"rrule": "^2.6.8", "react-scripts": "5.0.0",
This needs reopening as its still an issue with react-scripts 5.0.0 and rrule 2.6.8.
@chunkily is this forked branch you mentioned public?
It is indeed public. https://github.com/chunkily/rrule/tree/sourcemapless
So here are the steps I took
1) Fork the rrule repository 2) Create a new branch that disables sourcemap generation 3) Build the rrule library, and push the entire built dist/ folder to github 4) Update the dependencies in the react app's package.json to use the fork
"rrule": "chunkily/rrule#259ae356a78ae0d31a02eb4e87b3219072860abe"
Can someone please verify whether this still reproduces with v2.6.9? Thanks!
@davidgoli Unfortunately my supposed fix included in version 2.6.9 did in fact not fix this issue. My bad.
Any idea how to get it fixed?
Well, I can think of a three possible solutions, but each of them has their own cons.
1) Disable sourcemaps. This might make it harder to debug any issues in production environments. 2) Inline sourcemaps. This will bloat the size of the JS output. 3) Include the typescript source files when doing an install. This will bloat the size of installs.
I think the easiest solution is to include the src (.ts files) folder when installing.
Isn't this fixed yet, it's been there for a month already and block us to release our application with react-scripts 5.x
Can this be re-opened?
I'm still having this issue after upgrading react-scripts to 5.0.0.
Any updates?
This error still seems to be present on v2.7.1.
I'am having the same issue. Any updates? "rrule": "2.7.1" > also tried with "rrule": "2.7.2" "react-scripts": "5.0.1"
This should be resolves by PR #634.
Reporting an issue
Thank you for taking an interest in
rrule
! Please include the following in your report:[x] Verify that you've looked through existing issues for duplicates before creating a new one
[] Code sample reproducing the issue. Be sure to include all input values you are using such as the exact RRule string and dates. N/a
[] Expected output N/a
[] Actual output N/a
[x] The version of
rrule
you are using 2.5.6[x] Your operating system macOs High Sierra 10.13.6
[x] Your local timezone (run
$ date
from the command line of the machine showing the bug) Fri 30 Nov 2018 09:04:16 GMTI am using Webpack v4 to bundle my vendor dependencies, I'm also using the Source Map Loader to extract source maps from my vendor files into one, this includes the rrule package.
I am getting warnings for each rrule 'esm' file stating it cannot find the source map, as it is trying to find it in the
src
directory, not the 'dist' directory.If you look at one of the
*.map
files within thedist/esm
folder of rrule, you will see that thesources
point to thesrc
directory, and this is what is causing the warnings when using the source-map-loader to try and extract all vendor mappings.