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.

"vuex requires a promise polyfill in this browser"

See original GitHub issue

Re-raising this as I don’t think it was solved in #260

We should just be able to install babel-polyfill and then:

entry: {
  'babel-polyfill': 'babel-polyfill',
  app: './src/main.js'
},

But that’s a no go.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

56reactions
adambiggscommented, Feb 10, 2017

No idea what I’m doing wrong, but I’m still getting the same error with @DevanB’s final solution…

Error: [vuex] vuex requires a Promise polyfill in this browser.
  at webpack:///~/vuex/dist/vuex.js:214:0 <- index.js:34700

Edit: Got it working by adding es6-promise.auto.js to my karma.conf.js:

    files: [
      '../../node_modules/es6-promise/dist/es6-promise.auto.js',
      './index.js'
    ]

…Still not sure why import 'es6-promise/auto' doesn’t work in Karma.

54reactions
DevanBcommented, Feb 10, 2017

@limichange that worked!

Again, thanks @LinusBorg for the help also (and the new knowledge!)

I’ll be glad to put in a PR for some documentation on the process, if wanted. This was the final solution:

import 'es6-promise/auto'

import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import { sync } from 'vuex-router-sync'
import VueHead from 'vue-head'

sync(store, router)
Vue.use(VueHead)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue Unit Test Error: vuex requires a Promise polyfill in this ...
I created a project using vue-cli and added vuex and vue-router in it. I am trying to setup a unit test for it,...
Read more >
Error: [vuex] vuex requires a Promise polyfill in this browser
An error message everyone finds himself surprised to see once you start unit testing Vue components which have a dependency to vuex:
Read more >
Vuex requires a promise polyfill in the browser - Ikechi Michael
A polyfill is a re-write of something that should come natively with the browser, used for older browsers that do not have such...
Read more >
Fix vuex requires a Promise polyfill in this browser - hinty
When you start your Vue project in Safari or IE, you may face with: [vuex] vuex requires a Promise polyfill in this browser...
Read more >
IE 11 Vuex Polyfill - Laracasts
I can't load the page in Internet Explorer 11 because it complains about polyfill . ... [vuex] vuex requires a Promise polyfill in...
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