Repository: jkbrzt/rrule

Issue #303: JS map file 'sources' incorrect for dist/esm files
Created: 2018-11-30T09:19:06Z
Reporting an issue
Thank you for taking an interest in rrule! Please include the following in
your report:


 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


 The version of rrule you are using
2.5.6


 Your operating system
macOs High Sierra 10.13.6


 Your local timezone (run $ date from the command line
of the machine showing the bug)
Fri 30 Nov 2018 09:04:16 GMT


I 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.
WARNING in ./node_modules/rrule/dist/esm/weekday.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find source file '../../src/weekday.ts': Error: Can't resolve '../../src/weekday.ts' in '/Users/anth/sites/mysite/node_modules/rrule/dist/esm'

If you look at one of the *.map files within the dist/esm folder of rrule, you will see that the sources point to the src directory, and this is what is causing the warnings when using the source-map-loader to try and extract all vendor mappings.

Duplicate issue #522: Failed to parse source map from '~/node_modules/rrule/src/cache.ts' file: Error: ENOENT: no such file or directory, open '~/node_modules/rrule/src/cache.ts'
Created: 2022-06-13T08:33:43Z
Reporting an issue
Thank you for taking an interest in rrule! Please include the following in
your report:

 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.
I am using create-react-app version 5 with webpack version 5 , and on creating the build i am getting warings as shown below
 Expected output
Should work without failing on generating the source maps
 Actual output

 Webpack
  Compiled successfully in 12.17s

Compiled with warnings.

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/cache.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/cache.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/callbackiterresult.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/callbackiterresult.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/datetime.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/datetime.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/dateutil.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/dateutil.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/datewithzone.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/datewithzone.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/helpers.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/helpers.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/index.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/index.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iter/index.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iter/index.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iter/poslist.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iter/poslist.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterinfo/easter.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterinfo/easter.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterinfo/index.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterinfo/index.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterinfo/monthinfo.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterinfo/monthinfo.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterinfo/yearinfo.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterinfo/yearinfo.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterresult.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterresult.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterset.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/iterset.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/masks.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/masks.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/nlp/index.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/nlp/index.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/nlp/i18n.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/nlp/i18n.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/nlp/parsetext.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/nlp/parsetext.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/nlp/totext.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/nlp/totext.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/optionstostring.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/optionstostring.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/parseoptions.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/parseoptions.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/parsestring.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/parsestring.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/rrule.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/rrule.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/rruleset.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/rruleset.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/rrulestr.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/rrulestr.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/types.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/types.ts'

Failed to parse source map from '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/weekday.ts' file: Error: ENOENT: no such file or directory, open '/home/murtaza/umai/gc-self-service/node_modules/rrule/src/weekday.ts'


 The version of rrule you are using
version 2.7.0


 Your operating system
Linux (Ubuntu 21.04)


 Your local timezone (run $ date from the command line
of the machine showing the bug)
```
Mon 13 Jun 2022 04:33:28 PM +08
```

Closing comment (2024-09-04T08:18:37Z): This seems to be a duplicate of #303 if I'm not mistaken and should be resolves by PR #634.