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.

Uncaught TypeError: Cannot read property 'call' of undefined at __webpack_require__

See original GitHub issue

Hello @karol-f,

I created 2 projects with CLI-3.

The first is a library of components (Library), the second is an app (Back-Office) trying to import components from Library.

I followed your rules to import main.js from Library to Back-Office but I got this error:

Uncaught TypeError: Cannot read property 'call' of undefined
    at __webpack_require__ (app.js:786)

In Network, my 2 app.js are well imported (200 for each).

vue.config.js (Library):

module.exports = {
  configureWebpack: {
    output: {
      filename: '[name].js',
    },
  },
  css: {
    loaderOptions: {
      sass: {
        prependData: `
          @import "@/scss/style.scss";
        `,
      },
    },
  },
  devServer: {
    port: 2600,
    allowedHosts: ['localhost:2800'],
  },
  lintOnSave: true,
}

After research, found that it maybe an error on webpack version but couldn’t fix it. Did I miss something?

Thank you,

Guillaume

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
guillaumeduhancommented, Nov 25, 2019

@karol-f it worked !!! thank you very much,

just needed to not split js in chunks by adding to vue.config.js:

chainWebpack: config => { config.optimization.delete('splitChunks') },

Thank you very much karol!

1reaction
karol-fcommented, Nov 25, 2019

Great, glad it’s working!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'call' of undefined ...
My code no longer works in production either. I am getting the following error: Uncaught (in promise) TypeError: Cannot read property 'call ......
Read more >
Uncaught TypeError: Cannot read property 'call' of undefined
I'm having an issue with webpack where if I stop watching and restart, it will build just fine, but if I edit a...
Read more >
Cannot read property 'call' of undefined" error occurs when an ...
HtmlEditor - The " __webpack_require__ => Uncaught TypeError: Cannot read property 'call' of undefined" error occurs when an application with ...
Read more >
Webpack Unexpected Behavior Typeerror: Cannot Read ...
TypeError - Cannot read property 'then' of undefined is thrown when the caller is expecting a Promise to be returned and instead receives...
Read more >
Uncaught TypeError: Cannot read property 'call' of ... - Laracasts
Uncaught TypeError : Cannot read property 'call' of undefined. I keep getting this error on the Javascript console and the page won't load,...
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