error while using `tabulator-tables` with vue3: datetime formatter: `luxon is not defined` - vuejs3

Describe the bug
when using the newest version of vue (3.2.38) with luxon (3.0.3) and tabulator-tables (5.3.3), if a formatter of type datetime is defined, the formatter throws an error:
datetime.js:2 Uncaught ReferenceError: luxon is not defined
at Format.datetime$1 (datetime.js:2:30)
at Format.formatValue (Format.js:126:47)
at InternalEventBus.js:76:33
at Array.forEach (<anonymous>)
at InternalEventBus._chain (InternalEventBus.js:75:21)
at Proxy.chain (CoreFeature.js:82:30)
at Proxy._generateContents (Cell.js:99:14)
at Proxy.layoutElement (Cell.js:210:8)
at Proxy.getElement (Cell.js:136:10)
at BasicHorizontal.js:10:33
you can check a simplified version here on codesandbox
Does anyone have any idea what I'm doing wrong?
PS: REALLY BAD WORKAROUND
a very bad way of resolving the issue for the moment is to uncomment line 8 of MyTable.vue, ensuring that window.DateTime exists so that luxon.DateTime is not reached...
Screenshots

Related

how to use relay with deno freshjs

I'm trying to use relay-runtime with freshjs by importing it with these strings in my import map:
"react-relay": "https://esm.sh/react-relay#14.1.0?alias=react:preact/compat,react-dom:preact/compat,#types/react:preact/compat",
"relay-runtime": "https://esm.sh/relay-runtime#14.1.0?alias=react:preact/compat,react-dom:preact/compat,#types/react:preact/compat",
and when doing so, I get this error:
error: Uncaught (in promise) TypeError: Jl is not a function
at https://esm.sh/v94/relay-runtime#14.1.0/deno/relay-runtime.js:2:4933
at https://esm.sh/v94/relay-runtime#14.1.0/deno/relay-runtime.js:2:1389
at https://esm.sh/v94/relay-runtime#14.1.0/deno/relay-runtime.js:2:7965
at https://esm.sh/v94/relay-runtime#14.1.0/deno/relay-runtime.js:2:1389
at https://esm.sh/v94/relay-runtime#14.1.0/deno/relay-runtime.js:3:82513
at https://esm.sh/v94/relay-runtime#14.1.0/deno/relay-runtime.js:2:1389
at https://esm.sh/v94/relay-runtime#14.1.0/deno/relay-runtime.js:3:85815
at https://esm.sh/v94/relay-runtime#14.1.0/deno/relay-runtime.js:2:1389
at https://esm.sh/v94/relay-runtime#14.1.0/deno/relay-runtime.js:3:85832
I tried to import type declarations from https://esm.sh/v94/#types/relay-runtime#14.1.0/index.d.ts but am still having this issue. I had also tried to use v14.0.0 but then I get this error:
error: Uncaught (in promise) Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.
at V (https://esm.sh/v96/invariant#2.2.4/deno/invariant.js:2:612)
at sv (https://esm.sh/v96/relay-runtime#14.0.0/X-YS9yZWFjdDpwcmVhY3QvY29tcGF0/deno/relay-runtime.js:2:45152)
at https://esm.sh/v96/react-relay#14.0.0/X-YS9yZWFjdDpwcmVhY3QvY29tcGF0/deno/react-relay.js:2:3114
at https://esm.sh/v96/react-relay#14.0.0/X-YS9yZWFjdDpwcmVhY3QvY29tcGF0/deno/react-relay.js:2:2662
at https://esm.sh/v96/react-relay#14.0.0/X-YS9yZWFjdDpwcmVhY3QvY29tcGF0/deno/react-relay.js:2:70288
at https://esm.sh/v96/react-relay#14.0.0/X-YS9yZWFjdDpwcmVhY3QvY29tcGF0/deno/react-relay.js:2:2662
at https://esm.sh/v96/react-relay#14.0.0/X-YS9yZWFjdDpwcmVhY3QvY29tcGF0/deno/react-relay.js:2:71428
at https://esm.sh/v96/react-relay#14.0.0/X-YS9yZWFjdDpwcmVhY3QvY29tcGF0/deno/react-relay.js:2:2662
Any help is appreciated. Thank you. I also tried importing initially without the query string

cuxfilter.dashboard.DashBoard.preview keeps throwing "NameError: name 'launch' is not defined" at me

TLDR:
await d.preview() # throws "NameError: name 'launch' is not defined"
# d.preview() # does not throw "NameError: name 'launch' is not defined"; however, it still does not produce the desired image in a jupyter notebook... It's __repr__ prints <coroutine object DashBoard.preview at 0x7f44013aaa70>`
I'm trying to preview a rapids dashboard that is correctly rendering in a separate browser window. However, when I try to preview a rasterized screengrab of the dashboard using the convenient looking plotly method, d.preview(), I keep getting this paradoxical exception, "NameError: name 'launch' is not defined".
await d.preview() works in the documentation here:
https://docs.rapids.ai/api/cuxfilter/stable/themes/Themes.html
I am running rapids21.08 in python3.7 on ubuntu (Pop!_OS 20.10) using an RTX2080 GPU using a jupyter notebook with the default jupyter theme made using $ jt -r, and I am not using any matplotlib funny business. I have run the very common import matplotlib.pyplot as plt command.
This seems like a really common problem which I'm surprised isn't just working... Maybe there's something obvious I'm just missing... Please help me!
The full exception can be found postscript.
Thank you for your time,
Tim
P.S.
# d = some cuxfilter.dashboard.DashBoard instance that apparently works with d.show()
await d.preview() # throws NameError: name 'launch' is not defined
throws
NameError: name 'launch' is not defined
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_8654/2723113380.py in async-def-wrapper()
~/anaconda3/envs/pyenv_ub/lib/python3.7/site-packages/cuxfilter/dashboard.py in preview(self)
507 port=port, websocket_origin=url, show=False, start=True
508 )
--> 509 await screengrab("http://" + url)
510 self.stop()
511
~/anaconda3/envs/pyenv_ub/lib/python3.7/site-packages/cuxfilter/assets/screengrab.py in screengrab(url)
6
7 async def screengrab(url):
----> 8 browser = await launch({"slowMo": 5}, args=["--no-sandbox"])
9 page = await browser.newPage()
10 await page.setViewport(
NameError: name 'launch' is not defined
This is probably due to the missing pyppeteer package. Installing this in the conda env should resolve the issue:
conda install -c conda-forge pyppeteer>=0.2.6
cuxfilter=21.10 won't have this issue, as the dependency has been added to it.

How To Invoke GetCurrentDirectory Method in Clojure CLR?

I am just trying out Clojure CLR a bit and I am stumped about how to make what seems as if it should be a pretty simple call work.
Version is Clojure 1.10.0-master-SNAPSHOT
In the REPL I do this:
(import 'System.IO.FileSystem)
(FileSystem/Directory/GetCurrentDirectory)
I get the following response:
Syntax error (InvalidOperationException) compiling at (REPL:1:2).
Unable to find static field: GetCurrentDirectory in
Everything I can find about "Unable to find static field:" would seem to indicate that I've got the assembly name wrong but that doesn't seem to be it.
I also tried this:
(. FileSystem/Directory GetCurrentDirectory)
and I get
Syntax error (InvalidOperationException) compiling at (REPL:1:2).
Unable to find static field: Directory in System.IO.FileSystem
Also tried this:
(FileSystem/Directory/GetCurrentDirectory [])
And I get this error:
Syntax error (InvalidOperationException) compiling at (REPL:1:2).
Unable to find static field: GetCurrentDirectory in
Can someone please tell me what it is that I've gotten wrong here?
Under Core 3.1 and Net 5.0, System.IO.FileSystem does not contain GetCurrenDirectory or Directory. (You can check this quickly by evaling ((map #(.Name %) (concat (.GetMethods System.IO.FileSystem) (.GetProperties System.IO.FileSystem)) to see what's available.)
There is a System.IO.Directory class with a GetCurrentDirectory method. Try
(System.IO.Directory/GetCurrentDirectory)
or if you prefer to import the class
(import 'System.IO.Directory)
(Directory/GetCurrentDirectory)

SinonJS is failing to resolve "resolve" as a function

I have the following code.
getCallStub.returns(new Promise((resolve)=>{
resolve([item]);
}));
But there has to be an easier way so I look at the Sinon docs and see something like getCallStub.resolve([item]); should work but I get...
TypeError: getCallStub.resolve is not a function
I also tried getCallStub.usingPromise(Promise).resolve([item]); and got the same...
TypeError: getCallStub.usingPromise(...).resolve is not a function
I double checked the node_modules and I am at a version greater than 2 (6.3.5) so why can't I use the resolve function?
From the docs:
stub.resolves(value);
Seems you just forgot an s and your code should be
getCallStub.resolves([item]);

Getting this uncaught typeerror when importing ReactDayPicker

I'm simply importing at the top of my file as so:
import DayPicker from 'react-day-picker'
And then I'm getting this error in my console and can't seem to figure it out.
Weekdays.js?f84d:23 Uncaught TypeError: Super expression must either be null or a function, not undefined
at _inherits (Weekdays.js?f84d:23)
at eval (Weekdays.js?f84d:26)
at eval (Weekdays.js?f84d:77)
at Object../node_modules/react-day-picker/lib/src/Weekdays.js (person.js:4066)
at __webpack_require__ (common.js:694)
at fn (common.js:115)
at eval (Month.js?f52a:17)
at Object../node_modules/react-day-picker/lib/src/Month.js (person.js:4014)
at __webpack_require__ (common.js:694)
at fn (common.js:115)
I'm on React v0.14.8 and I'm getting the same error. In v6.0.0 of react-day-picker, some components were converted to use React.PureComponent (which was introduced in React v15.3.0). I believe this is why we're getting that error because our versions of React doesn't have React.PureComponent. The fix would be to upgrade your React to v15.3.0+.
If you are using react-day-picker v6.0, try to upgrade to v6.2 where the PureComponent has been replaced by shouldComponentUpdate. This should keep compatibility with React 0.14+

Resources