Getting this uncaught typeerror when importing ReactDayPicker - react-day-picker

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+

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

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

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

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]);

JSX Converter using React.createElement("h1", null) instead of React.DOM.h1(null)

JSX Transformer Causes Errors
When I convert my react files using the converter from react-tools
$ jsx public/dev/jsx public/prod/js --no-cache-dir
Or when I convert with grunt-react
$ grunt react
My production file breaks because the conversion uses React.createElement and the error says that this function is undefined.
<h1>{this.state.title}</h1>
converts to:
React.createElement("div", null,
React.createElement("h1", null, this.state.title)
instead of:
React.DOM.h1(null, this.state.title)
The live converter works fine because it uses React.DOM.h1(null, this.state.title). This line of code works well with react, but the React.createElement() function does not work and is not found.
How can I force my auto converter, either JSX or grunt, to convert to React.DOM.h1(null) instead of React.createElement(h1, null). Why does the converter use this function?
I had the same error with the coffee-react-transform lib. These libraries are getting updated for React 0.12. If you're still on React 0.11, you'll probably need to roll back grunt-react to a slightly older version, or bump up to React 0.12.
Yea, I actually updated to React 0.12 and it started working... Thanks.

Resources