Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
7 tasks done
m-nathani opened this issue Jun 13, 2022 · 27 comments · May be fixed by #634 or #637

Comments

@m-nathani
Copy link

m-nathani commented Jun 13, 2022

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

    ```
    
@Artofaj
Copy link

Artofaj commented Jun 15, 2022

Having exactly the same issue. Running on Arch

@davidgoli
Copy link
Collaborator

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
Copy link
Collaborator

See this relevant discussion here: googleapis/google-cloud-node#2867

@slavcoc
Copy link

slavcoc commented Jul 26, 2022

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

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

@poojagupta2019
Copy link

@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
Copy link

@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
Copy link

Experiencing the same issue. Any update please?

@dilip-valiya-kr
Copy link

Experiencing the same issue.

@tommyfr
Copy link

tommyfr commented Dec 9, 2022

Same here unfortunately.

@hanhn-dev
Copy link

@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
Copy link

same error :(

@replaysMike
Copy link

same 👎

@hardchor
Copy link

hardchor commented Apr 2, 2023

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

@replaysMike
Copy link

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

@tomasz-szylkiewicz
Copy link

tomasz-szylkiewicz commented Apr 11, 2023

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

@sambhavjain-10
Copy link

sambhavjain-10 commented May 16, 2023

Is this still not fixed? :(

@jovana
Copy link

jovana commented Jun 27, 2023

This issue is still in version 2.7.2.

Workaround for me also:

GENERATE_SOURCEMAP=false

@samuelstecher
Copy link

+1

@Taskle
Copy link

Taskle commented Jul 28, 2023

I've just created this PR to resolve the issue -- I've tested and it works locally: #593

@mgug01
Copy link

mgug01 commented Sep 14, 2023

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

@RandScullard
Copy link

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

@IvanGrekov
Copy link

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
Copy link

Where you have added it?

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

@max-two
Copy link

max-two commented Jul 22, 2024

@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 dargmuesli linked a pull request Sep 4, 2024 that will close this issue
@dargmuesli
Copy link

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

@dargmuesli dargmuesli linked a pull request Sep 4, 2024 that will close this issue
@giorgioGTelian
Copy link

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.

could a solution be using yarn?

@mbchambliss
Copy link

I just tried adding the rrule library and I'm getting the same issues about failed to parse source map for [x] files. Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.