在\node_modules\xlsx-style\dist\cpexcel.js 807行
时间: 2023-09-14 13:07:50 浏览: 205
可以读取EXCEL文件的js代码第1/2页
在\node_modules\xlsx-style\dist\cpexcel.js的807行,有一个报错。根据提供的引用内容,有两种解决方案可以修复这个问题。方案一是修改源码,在807行将var cpt = require('./cpt' 'able');修改成var cpt = cptable;方案二是在vue.config.js文件中添加如下配置:
module.exports = {
configureWebpack() {
return {
externals: [
{ './cptable': 'var cptable' }
]
}
}
}
这样做可以解决文件路径的问题,并修复报错。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [安装xlsx-style报错./cptable in ./node_modules/xlsx-style@0.8.13@xlsx-style/dist/cpexcel.js](https://blog.csdn.net/weixin_43927930/article/details/118554179)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [JsCoverageQC:CoverageQC(https](https://download.csdn.net/download/weixin_42134554/18978506)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [This relative module was not found:* ./cptable in ./node_modules/xlsx-style/dist/cpexcel.js 报错问题](https://blog.csdn.net/qq_51553392/article/details/129241103)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文