webpacker: this._ir.once is not a function

Hello!

I just started to use webpacker for my new rails + vue based project and i need to admit i love it! Thanks for this amazing piece of software.

However, in 1 in ~10 file saves and rebuilts, it throws a bunch of errors in javascript console and sometimes rebuilding the bundle several times fixes it but most of the times - i need to restart the yarn process. That’s pretty random thing.

The error is (there are 3 of them):

Uncaught TypeError: this._ir.once is not a function
    at new SockJS (main.js?8e93:122)
    at socket (socket.js?e5d0:7)
    at Object.eval (client?8505:165)
    at eval (48:190)
    at Object.<anonymous> (hello_vue.js:640)
    at __webpack_require__ (hello_vue.js:20)
    at Object.<anonymous> (hello_vue.js:3134)
    at __webpack_require__ (hello_vue.js:20)
    at hello_vue.js:63
    at hello_vue.js:66
Uncaught TypeError: this.xo.once is not a function
    at new InfoAjax (info-ajax.js?7213:21)
    at Function.InfoReceiver._getReceiver (info-receiver.js?aa33:39)
    at InfoReceiver.doXhr (info-receiver.js?aa33:56)
    at eval (info-receiver.js?aa33:25)
abstract-xhr.js?c769:21 Uncaught TypeError: self._start is not a function
    at eval (abstract-xhr.js?c769:21)

It doesn’t looks like an error on my side as i can randomly fix it with rebuilding. On the other hand, i’m not too experienced with webpack internals so i can’t say anything more about it.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (9 by maintainers)

Most upvoted comments

@mbajur thanks for making the PR. I will take a look - I am suspecting it’s related to inlining styles within packs.

@mbajur Could you please clone this repo and see if you can reproduce it? https://github.com/gauravtiwari/testwebpacker

Feel free to make a PR if you think something is missing in this setup vs yours.

To run

bundle
yarn
gem install foreman
foreman start