rrule icon indicating copy to clipboard operation
rrule copied to clipboard

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'

Open m-nathani opened this issue 3 years ago • 27 comments

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
  • [x] 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
  • [x] Expected output Should work without failing on generating the source maps
  • [x] 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'
  • [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

    ```
    

m-nathani avatar Jun 13 '22 08:06 m-nathani

Having exactly the same issue. Running on Arch

Artofaj avatar Jun 15 '22 14:06 Artofaj

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 avatar Jul 11 '22 02:07 davidgoli

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

davidgoli avatar Jul 11 '22 02:07 davidgoli

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

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

slavcoc avatar Jul 26 '22 12:07 slavcoc

@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.

poojagupta2019 avatar Aug 03 '22 08:08 poojagupta2019

@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!

doubleforte avatar Nov 25 '22 18:11 doubleforte

Experiencing the same issue. Any update please?

jhunexjun avatar Nov 30 '22 22:11 jhunexjun

Experiencing the same issue.

dilip-valiya-kr avatar Dec 02 '22 09:12 dilip-valiya-kr

Same here unfortunately.

tommyfr avatar Dec 09 '22 11:12 tommyfr

@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.

hanhn-dev avatar Dec 15 '22 05:12 hanhn-dev

same error :(

gino8080 avatar Feb 10 '23 14:02 gino8080

same 👎

replaysMike avatar Mar 31 '23 19:03 replaysMike

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

hardchor avatar Apr 02 '23 16:04 hardchor

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

replaysMike avatar Apr 02 '23 18:04 replaysMike

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

tomasz-szylkiewicz avatar Apr 11 '23 09:04 tomasz-szylkiewicz

Is this still not fixed? :(

sambhavjain-10 avatar May 16 '23 08:05 sambhavjain-10

This issue is still in version 2.7.2.

Workaround for me also:

GENERATE_SOURCEMAP=false

jovana avatar Jun 27 '23 08:06 jovana

+1

samuelstecher avatar Jul 17 '23 14:07 samuelstecher

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

Taskle avatar Jul 28 '23 22:07 Taskle

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

mgug01 avatar Sep 14 '23 00:09 mgug01

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/,
    }

RandScullard avatar Oct 09 '23 15:10 RandScullard

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?

IvanGrekov avatar Feb 22 '24 18:02 IvanGrekov

Where you have added it?

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

RandScullard avatar Feb 22 '24 22:02 RandScullard