Closed joeosburn closed 4 years ago
Hey, klona
is a named export.
const { klona } = require('klona');
// Or
import { klona } from 'klona';
Thanks. I've tried:
const { klona } = require('klona');
And I get the exact same error. When I log the value of klona
this way, it's undefined
.
edit: I updated to the latest version of klona and that solved it. Thanks!
Ah I was going to say, there's no way you're using 2.x then
The named export was the breaking change from 1.x to 2.x. Your intellisense might not like 1.x but that's part of the reason for the named export.
Closing since you got it working. Thanks!
Hey Luke,
Myself and a coworker have been running into an issue with klona. When we attempt to use klona with CommonJS, such as the following:
We get the error:
klona is not a function
.All other requires seem to be working and I've tried deconstructing the require as well. Any idea what the issue might be?