当前位置:   article > 正文

cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_mod

cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader

项目场景:

项目相关背景:

使用 Visual Studio Code(简称“VS Code”) 开发 vue 项目时,控制台出现以下报错信息:

cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./tools/vue-filename-injector/src/lib/injector.js?!./src/views/benefit/upload-update.vue?vue&type=script&lang=js&:521 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘id’)
at VueComponent.handleRemove (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./tools/vue-filename-injector/src/lib/injector.js?!./src/views/benefit/upload-update.vue?vue&type=script&lang=js&:521:35)
at doRemove (element-ui.common.js:29691:16)
at eval (element-ui.common.js:29700:13)


问题描述

遇到的问题:

例如:数据传输过程中数据不时出现丢失的情况,偶尔会丢失一部分数据
APP 中接收数据代码:

cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./tools/vue-filename-injector/src/lib/injector.js?!./src/views/benefit/upload-update.vue?vue&type=script&lang=js&:521 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')
    at VueComponent.handleRemove (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./tools/vue-filename-injector/src/lib/injector.js?!./src/views/benefit/upload-update.vue?vue&type=script&lang=js&:521:35)
    at doRemove (element-ui.common.js:29691:16)
    at eval (element-ui.common.js:29700:13)
  • 1
  • 2
  • 3
  • 4

在这里插入图片描述


原因分析:

分析:

  1. 路径长度过长:可能是因为您的文件路径过长,超出了系统或工具的限制。

  2. 文件路径错误:有时候设置的文件路径不正确也会导致类似错误。请确保在 webpack 配置文件或相关代码中正确地指定了文件路径。

  3. 构建工具配置错误:可能是您的构建工具配置有误,导致无法正确加载所需的模块。

  4. 依赖模块问题:某个依赖模块可能存在问题或不兼容,导致构建失败。

  5. 缓存问题:有时候缓存文件可能引发类似的错误。


解决方案:

解决方案:

  1. 路径长度过长:可能是因为您的文件路径过长,超出了系统或工具的限制。

    解决方法 :
    尽量缩短文件路径名,保持路径长度在合理范围内。

  2. 文件路径错误:有时候设置的文件路径不正确也会导致类似错误。

    解决方法 :
    请确保在 webpack 配置文件或相关代码中正确地指定了文件路径。

  3. 构建工具配置错误:可能是您的构建工具配置有误,导致无法正确加载所需的模块。

    解决方法 :
    请检查 webpack 配置文件或其他相关构建工具配置,确保配置正确。

  4. 依赖模块问题:某个依赖模块可能存在问题或不兼容,导致构建失败。

    解决方法 :
    您可以尝试更新相关依赖模块,或者检查是否有版本兼容性的问题。

  5. 缓存问题:有时候缓存文件可能引发类似的错误,

    解决方法 :
    尝试清除缓存或者尝试重新构建项目。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/450812
推荐阅读
相关标签
  

闽ICP备14008679号