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

TZID requires luxon warning, when I have Luxon already #427

Closed
6 tasks
mapidemic opened this issue Oct 11, 2020 · 12 comments
Closed
6 tasks

TZID requires luxon warning, when I have Luxon already #427

mapidemic opened this issue Oct 11, 2020 · 12 comments

Comments

@mapidemic
Copy link

@neekey
Copy link

neekey commented Oct 18, 2020

I think this issue started from 2.6.6? It should not just be a warning, should just throw an error, and in a real application, replace the timezone with UTC will cause serious business issues (in my case I'm writing a medical appointment system, this change caused all the appointments having wrong start time).

@neekey
Copy link

neekey commented Oct 18, 2020

I can confirm roll back to 2.6.4 fixes this issue. and I think there are two main issues about this new version update:

  • as I mentioned in my previous comment, it's quite a big breaking change, it shouldn't just be a minor version increase, I used ^2.6.4 in my package.json, ended up upgrading it to 2.6.6 while I was refreshing the package-lock.json for other reasons.
  • even with the warning, it's not clear how to "provide luxon", nowhere in this repo mentioned that.

@marcoancona
Copy link

I confirm the issue. Luxon is never found in 2.6.6 and a warning is displayed.

@jkassis
Copy link

jkassis commented Nov 5, 2020

i am doing a rollup that includes the rrule module and am getting this...

Error: 'DateTime' is not exported by apps/store/code/node_modules/luxon/build/cjs-browser/luxon.js, imported by apps/store/code/node_modules/rrule/dist/esm/src/datewithzone.js
    at error (file:///Users/jkassis/Code/merchie/server/node_modules/rollup/dist/es/shared/rollup.js:5156:30)
    at Module.error (file:///Users/jkassis/Code/merchie/server/node_modules/rollup/dist/es/shared/rollup.js:9659:16)
    at handleMissingExport (file:///Users/jkassis/Code/merchie/server/node_modules/rollup/dist/es/shared/rollup.js:9581:28)
    at Module.traceVariable (file:///Users/jkassis/Code/merchie/server/node_modules/rollup/dist/es/shared/rollup.js:10054:24)
    at ModuleScope.findVariable (file:///Users/jkassis/Code/merchie/server/node_modules/rollup/dist/es/shared/rollup.js:8613:39)
    at FunctionScope.findVariable (file:///Users/jkassis/Code/merchie/server/node_modules/rollup/dist/es/shared/rollup.js:2683:38)
    at ChildScope.findVariable (file:///Users/jkassis/Code/merchie/server/node_modules/rollup/dist/es/shared/rollup.js:2683:38)
    at FunctionScope.findVariable (file:///Users/jkassis/Code/merchie/server/node_modules/rollup/dist/es/shared/rollup.js:2683:38)
    at ChildScope.findVariable (file:///Users/jkassis/Code/merchie/server/node_modules/rollup/dist/es/shared/rollup.js:2683:38)

@jkassis
Copy link

jkassis commented Nov 5, 2020

@jkassis
Copy link

jkassis commented Nov 5, 2020

yarn add --ignore-optional rrule does not seem to work. i'll try a custom build without the luxon dependency. sigh.

@alexsotocx
Copy link

How do I include Luxon again? I have it on my npm modules but rrule is not working as it was 2.6.4 I get the error Using TZID without Luxon available is unsupported. Returned times are in UTC, not the requested time zone

@spacegangster
Copy link

Is it viable to add a test for that? To test that Luxon plugs in.
How costly will it be?

@lxcid
Copy link

lxcid commented Oct 12, 2021

For anyone still facing this issue, #410 is the PR of reference.

Basically, if you are using commonjs module system, you can no longer provide luxon as it automatically replaced with fake_luxon.

I would suggest anyone with this problem to stick it to 2.6.4 if possible. or you have to switch to es module system.

jens-maus pushed a commit to jens-maus/node-ical that referenced this issue Nov 9, 2021
* Downgraded rrule to 2.6.4 until this is fixed: jkbrzt/rrule#427
* Construct RRule with original datestring and timezone
Co-authored-by: Jens Maus <mail@jens-maus.de>
@hcharley
Copy link

@lxcid thank you for your advice to stick to 2.6.4.

@Melodyn
Copy link

Melodyn commented Feb 27, 2022

I ran into this problem on version 2.6.8 and 2.6.4. I wanted to make a test case in this Issue to show that the solution does not help, however, I found the cause of the warning. It occurs only when the object has a tzid property.

There is a warning:

{
  tzid: 'Europe/Moscow',
  dtstart: 2022-01-04T17:00:00.000Z,
  until: 2022-12-31T20:59:59.000Z,
  freq: 2,
  interval: 1,
  wkst: 0,
  byweekday: [ 1 ],
  byhour: [ 17 ],
  byminute: [ 0 ],
  bysecond: [ 0 ]
}

No warning:

{
  dtstart: 2022-01-04T17:00:00.000Z,
  until: 2022-12-31T20:59:59.000Z,
  freq: 2,
  interval: 1,
  wkst: 0,
  byweekday: [ 1 ],
  byhour: [ 17 ],
  byminute: [ 0 ],
  bysecond: [ 0 ]
}

Now I just remove this property, as it does not affect the functionality of my application in any way.

@davidgoli
Copy link
Collaborator

Luxon is no longer used as of 2.7.0

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

No branches or pull requests

10 participants