Does vega-lite's ES6 support mean that it won't work on phantomjs? - phantomjs

I'm using phantomjs to scrape a page that uses vega-lite charts, however I keep getting this error whenever my code calls vegaEmbed:
ReferenceError: Can't find variable: vegaEmbed
I'm guessing this has something to do with phantomjs not supporting ES6. Can anyone confirm?

Related

Browser's Debugger Showing Old Code for Vue

Sometimes I add a new variable to the Vue data() and get a ReferenceError (like "ReferenceError: windowHeight is not defined"), then when I check the error in the Firefox's debugger, I see that Vue in debugger is the old code not the one I have in my IDE. But when I try the exact same thing in Private Browsing I can see the code being exactly the same as my IDE.
Is this some kind of caching problem? Or is it related to my IDE which is VSCode. And how can I solve it?
I was expecting to see the same code as in my IDE, but during debug I see the old one.

Running Spartacus Storefront in IE11 returning classList error even though we have required polyfills

We are evaluating Spartacus for our B2B eCommerce site re-platform. One of the main requirement is to support IE11 (MUST). As per Spartacus documentation, Angular itself supports IE11 with polyfills and so Spartacus should work in IE11 without Spartacus styles (variable css).
We have tried to pollyfill OOTB Spartacus (3.1 & 3.2 in SSR mode & non SSR) and it is loading the pages & functionality but we are getting classList error in web console. Even though we have required polyfills. Below are the polyfills that we have installed & configured :
classlist.js
web-animation.js
core-js
and also target compilation is es5.
IE11 -Spartacus 3.1 & 3.2 classList error
Any help to resolve this classLIST error would be helpful.
So, does anyone made Spartacus work in IE11 with your own stylesheets ?
It looks like the root problem is that some DOM element reference is undefined while expected to be defined. Therefore its property classList cannot be accessed.
How to debug
Most optimal way for debugging will be using Spartacus repo: please clone the spartacus repo, install deps (yarn), and run yarn start. Then open it in IE11 and please debug.
The class that looks like a candidate for causing the error might be PageTemplateDirective.
I've searched the Spartacus codebase, where classList property is accessed. In most cases the DOM element is body - which should be always defined. It's not the case only for PageTemplateDirective and ProductIntroComponent (but the latter one is not displayed on home page, so I think it's not relevant).
Please set the debugger in the methods of PageTemplateDirective, to check when the DOM element reference is undefined and please investigate further.
Ongoing deprecation of ie11 by Angular
Please note that Angular is planning to deprecate the support of IE11 in ng12 (coming soon) and drop it in ng13 (late 2021). See: https://github.com/angular/angular/issues/41840

How to stop Electron from printing devtools extension errors to console?

I've been using Vue devtools extension with Electron and whenever I activate and use Vue devtools, all the errors occurred from it gets printed out to the Electron's main process console like this.
It's so frustrating because It's hard to find any useful information printed out from my application in middle of these thousands of errors.
I know why the error occurs. It's because Vue devtools is trying to access the chrome.tabs.captureVisibleTab() function which isn't available on Electron but I don't really care about the errors occurring from Vue devtools here. I just need to stop Electron from printing these errors out. Looked through all of the devtools related documentation but found nothing on this.

IE11 - failed to open http://localhost:8080

I am trying to access my VueJS application running on my node server on IE11 by accessing the URL http://localhost:8080. However I cant access the same as only a blank screen appears. I have babel polyfill installed and imported in my main file and have babel presets already setup in babelrc file.
My app is currently running and is accessible on Chrome but not on IE11.
I don't get a single error message in console and have no clue what could be going wrong. Has anyone ever faced this?
You need to use polyfills. IE11 does not support ES2015, it needs to be transiled by babel. There seem to be various ways of doing this.
Please check this guide: jacklyons.me/how-to-fix-vuejs-not-working-in-ie11
or here: cli.vuejs.org/guide/browser-compatibility.html

How do I check for vue js compilation errors before trying to serve it?

I've just lost a frustrating amount of time trying to work out why npm run serve was hanging when attempting to run my vue js app. Eventually, I tracked it down to one error in a vue file I made, it took me a long time to work this out since the issue manifests itself in a way that the console window just hangs.
Is there some other way developers can get a more descriptive error list from vue js prior to attempting to run/build?
Personally, I find the most useful and essential tools to be (I use VS Code as "IDE")
Vetur: includes syntax-highlighting, snippets, linter (error checking), auto completition, etc.
Vue.js devtools (for chrome): Not sure about other browsers, but this is incredibly useful for chrome. Let's you see what's really going on with vue.js' components, the store, etc (screenshot from the chrome store page).
Hope this helps!