jkbrzt / rrule

JavaScript library for working with recurrence rules for calendar dates as defined in the iCalendar RFC and more.
https://jkbrzt.github.io/rrule
Other
3.29k stars 514 forks source link

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' #522

Open m-nathani opened 2 years ago

m-nathani commented 2 years ago

Reporting an issue

Thank you for taking an interest in rrule! Please include the following in your report:

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'

- [x] The version of `rrule` you are using
version `2.7.0`
- [x] Your operating system
Linux (Ubuntu 21.04)
- [x] Your local timezone (run `$ date` from the command line
      of the machine showing the bug)
  Mon 13 Jun 2022 04:33:28 PM +08

  ```
Artofaj commented 2 years ago

Having exactly the same issue. Running on Arch

davidgoli commented 2 years ago

Aha, this makes sense actually. The generated sourcemaps are simply a statement-by-statement mapping from the output in the npm bundle (dist/) to a source file under src/, and the src/ isn't published in the npm bundle, so naturally it isn't found! I'll experiment with some other build settings and see what I can come up with.

davidgoli commented 2 years ago

See this relevant discussion here: https://github.com/googleapis/google-cloud-node/issues/2867

slavcoc commented 2 years ago

Wouldn't be simple as including src into the files in the package.json?

"files": [ "dist", "README.md", "src/**" ],

poojagupta2019 commented 2 years ago

@davidgoli Do we have any solution figured out for this issue? I'm facing the same issue and for now, I have fixed it by adding "GENERATE_SOURCEMAP=false" in the .env file in my project.

doubleforte commented 1 year ago

@davidgoli Any progress with this? I can't add "GENERATE_SOURCEMAP=false", as we actually do need our own source maps.

Thanks for your work on this library. It's a huge help!

jhunexjun commented 1 year ago

Experiencing the same issue. Any update please?

dilip-valiya-kr commented 1 year ago

Experiencing the same issue.

tommyfr commented 1 year ago

Same here unfortunately.

hanhn-dev commented 1 year ago

@davidgoli Any progress with this? I can't add "GENERATE_SOURCEMAP=false", as we actually do need our own source maps.

Thanks for your work on this library. It's a huge help!

if you still want it in your Development, you can create a new file called .env.production and add to this file. This is just for deployment.

gino8080 commented 1 year ago

same error :(

replaysMike commented 1 year ago

same 👎

hardchor commented 1 year ago

@davidgoli Sorry for the direct / late ping, but did you figure out any solution?

replaysMike commented 1 year ago

I went with GENERATE_SOURCEMAP=false which was ok in my case

tomasz-szylkiewicz commented 1 year ago

I'm experiencing same error and also cannot use "GENERATE_SOURCEMAP=false" as a fix

sambhavjain-10 commented 1 year ago

Is this still not fixed? :(

jovana commented 1 year ago

This issue is still in version 2.7.2.

Workaround for me also:

GENERATE_SOURCEMAP=false
samuelstecher commented 1 year ago

+1

Taskle commented 1 year ago

I've just created this PR to resolve the issue -- I've tested and it works locally: https://github.com/jakubroztocil/rrule/pull/593

mgug01 commented 12 months ago

+1 Also cannot use the .env solution in my project unfortunately.

RandScullard commented 11 months ago

You probably don't want to turn off source map generation for your entire project, but you can suppress the source map warnings from rrule and get a clean build. The solution described here worked great for me: https://github.com/facebook/create-react-app/discussions/11767#discussioncomment-3416044

I used the following config:

ignoreWarnings: [
    {
        message: /source-map-loader/,
        module: /node_modules\/rrule/,
    }
IvanGrekov commented 6 months ago

You probably don't want to turn off source map generation for your entire project, but you can suppress the source map warnings from rrule and get a clean build. The solution described here worked great for me: facebook/create-react-app#11767 (comment)

I used the following config:

ignoreWarnings: [
    {
        message: /source-map-loader/,
        module: /node_modules\/rrule/,
    }

Where you have added it?

RandScullard commented 6 months ago

Where you have added it?

@IvanGrekov Check out the comment I referenced. I did it the way they described.

max-two commented 1 month ago

@davidgoli if the source maps are broken should the source maps just be turned off by changing the devtool: 'source-map' option in the webpack config? At least as a temporary fix until someone is able to do the proper solution that you would like.

I'd be happy to open a PR and test it out if you think that's an acceptable approach for the time being. I don't think I'm knowledgable enough to do the full solution discussed in that google cloud thread you linked.

dargmuesli commented 1 week ago

This seems to be a duplicate of #303 if I'm not mistaken and should be resolves by PR #634.