Uncaught TypeError: Cannot read property 'call' of undefined at __webpack_require__
See original GitHub issueHello @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:
- Created 4 years ago
- Comments:12 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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!
Great, glad it’s working!