question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vue use work-plugin. Error

See original GitHub issue

in xxx.work.js has some code like:

(async function Loop() {
    self.setInterval(async () => {
        let data = 'abcdefg';
        postMessage(data);
    }, 3000)
})()

and then. error on console. when compile like:

    6:47  error  'regeneratorRuntime' is not defined         no-undef
   7:12  error  'regeneratorRuntime' is not defined         no-undef
   8:14  error  Unexpected constant condition               no-constant-condition
  11:76  error  'regeneratorRuntime' is not defined         no-undef
  13:22  error  'regeneratorRuntime' is not defined         no-undef
  14:24  error  Unexpected constant condition               no-constant-condition
  20:21  error  Expected a 'break' statement before 'case'  no-fallthrough
  28:11  error  Expected a 'break' statement before 'case'  no-fallthrough

but without Method ‘setInterval’ ,it can works.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
cwwjsyccommented, Sep 16, 2020

Add code comment on the file of *worker.js. like /* eslint-disable */

IT works.!

1reaction
mima3commented, Feb 24, 2021

I created an .eslintignore file to work around this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vuefire with Vue 3 throwing Vue.use error - Stack Overflow
I generated the project using @vue/cli. I want to use firestorePlugin from vuefire. I am using Vue3 Here is the source code import...
Read more >
Cannot import Vue Plugin using Composition API in my project
use(VueCompositionApi); from plugin, I will get this error in my project: Error in data(): "Error: [vue-composition-api] must call Vue.use( ...
Read more >
Available rules - eslint-plugin-vue
Rule ID Description vue/multi‑word‑component‑names require component names to be always multi‑word... vue/no‑arrow‑functions‑in‑watch disallow using arrow functions to define watcher... vue/no‑computed‑properties‑in‑data disallow accessing computed properties in data...
Read more >
createLocalVue() - Vue Test Utils
createLocalVue returns a Vue class for you to add components, mixins and install plugins without polluting the global Vue class. The errorHandler option...
Read more >
User Guide | eslint-plugin-vue
Configurations for using Vue.js 3.x. "plugin:vue/vue3-essential" ... base , plus rules to prevent errors or unintended behavior.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found