Webpack4 npm start 未捕获类型错误

问题描述 投票:0回答:2

我 npm start Vue 项目没问题,但是我打开浏览器页面是空白的。这是未捕获的以下错误,

类型错误:无法读取未定义的属性“调用”

控制台视图如下,

Uncaught TypeError: Cannot read property 'call' of undefined
    at __webpack_require__ (app.js:768)
    at fn (app.js:142)
    at Module../src/main.js (app.js:10476)[enter image description here][1]
    at __webpack_require__ (app.js:768)
    at fn (app.js:142)
    at Object.0 (app.js:10547)
    at __webpack_require__ (app.js:768)
    at checkDeferredModules (app.js:44)
    at app.js:844
    at app.js:847

当我调试时,我发现有错误:

modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));

// The require function
    function __webpack_require__(moduleId) {

        // Check if module is in cache
        if(installedModules[moduleId]) {
            return installedModules[moduleId].exports;
        }
        // Create a new module (and put it into the cache)
        var module = installedModules[moduleId] = {
            i: moduleId,
            l: false,
            exports: {},
            hot: hotCreateModule(moduleId),
            parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
            children: []
        };

        // Execute the module function
        **modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));**

        // Flag the module as loaded
        module.l = true;

        // Return the exports of the module
        return module.exports;
    }
javascript vue.js webpack
2个回答
1
投票

清除浏览器捕获内存并进行硬刷新。

请参考这个


0
投票

除了清除浏览器缓存还有其他解决办法吗?

© www.soinside.com 2019 - 2024. All rights reserved.