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

Page stops working after adding import statement #210

Closed
EmilyCheoh opened this issue Sep 14, 2021 · 6 comments
Closed

Page stops working after adding import statement #210

EmilyCheoh opened this issue Sep 14, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@EmilyCheoh
Copy link

Hi! I'm trying to set up a project using vega-lite. After installing the packages and modifying the rollup.config.js, I got this error of Uncaught TypeError: Cannot destructure property 'ANY' of 'require$$26' as it is undefined. in my browser's console right after I add the line of import { VegaLite } from "svelte-vega";. I also had warnings of Circular dependencies and this has been rewritten to undefined:

(!) this has been rewritten to undefined
https://rollupjs.org/guide/en/#error-this-is-undefined
node_modules/fast-json-patch/module/helpers.mjs
4: * MIT license
5: */
6: var __extends = (this && this.__extends) || (function () {
^
7: var extendStatics = function (d, b) {
8: extendStatics = Object.setPrototypeOf ||
...and 1 other occurrence
node_modules/vega-lite/build/src/compile/compile.js
1: var __rest = (this && this.__rest) || function (s, e) {
^
2: var t = {};
3: for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
...and 1 other occurrence
node_modules/vega-lite/build/src/log/index.js
2: * Vega-Lite's singleton logger utility.
3: */
4: var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
^
5: if (kind === "m") throw new TypeError("Private method is not writable");
6: if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
...and 3 other occurrences

I'm not sure what is happening and would really appeaciate any help or clarifications. Thanks in advance!

@EmilyCheoh EmilyCheoh added the bug Something isn't working label Sep 14, 2021
@domoritz
Copy link
Member

Please update to the latest Vega-Lite and also see #90. Does that fix it?

@EmilyCheoh
Copy link
Author

Thank you for your reply! My vega-lite is up-to-date and I was using rollup and copied the svelte-vega package's configuration code but still got the

this has been rewritten to undefined

error.

@domoritz
Copy link
Member

That's a warning, not an error, no?

@EmilyCheoh
Copy link
Author

Ah yes, sorry! The error I got is actually [!] Error: You must specify "output.file" or "output.dir" for the build. Do you think this is because I was using JavaScript instead of TypeScript as my rollup.config.js looks like this:
image
Thanks!

@domoritz
Copy link
Member

This sounds like an issue with your build config and not this project. I am closing this issue but am happy to reopen if you think that's a mistake.

@EmilyCheoh
Copy link
Author

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants