09:45:32.879 Error when using sourcemap for reporting an error: Can't resolve original location of error. 09:45:32.881 "doExport" is not exported by "../../../../../../../Documents/HBuilderProjects/ytk/common/exportExcel.js", imported by "../../../../../../../Documents/HBuilderProjects/ytk/pages/search/company/company.vue". 09:45:32.882 at pages/search/company/company.vue:5:9 09:45:32.883 3: import { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode... 09:45:32.884 4: 09:45:32.887 5: import { doExport } from '@/common/exportExcel.js'; 09:45:32.889 ^ 09:45:32.890 6: import { jsons } from '/untils/excelJson.js'
时间: 2023-08-11 10:04:24 浏览: 420
这个错误提示说在使用sourcemap报告错误时无法解析错误的原始位置。同时,它指出在你的`company.vue`文件中,尝试导入的`doExport`函数在`exportExcel.js`文件中没有被导出。
这个问题可能有几种可能的原因:
1. 确保`exportExcel.js`文件中确实有导出`doExport`函数,并且导出语句是正确的。
```javascript
export function doExport() {
// 函数的定义和实现
}
```
2. 确保路径`@/common/exportExcel.js`是正确的。你可以检查一下相对路径是否正确,并且确保文件名拼写正确。
请根据上述提示进行检查和调整,应该能够解决这个问题。
相关问题
Module not found: Error: Can't resolve './demo' in
Module not found: Error: Can't resolve './demo' in ... 这个错误通常是由于无法找到指定的模块导致的。根据引用,在解决这个问题之前,我们需要检查项目文件中是否存在名为'./demo'的模块。如果这个模块确实存在,那么我们需要确保路径是正确的,并且该模块已经正确地引入到项目中。如果这个模块不存在,那么我们需要检查代码中是否存在对该模块的引用,并相应地进行修改。此外,根据引用,还需要确保webpack的配置文件名字是正确的,应该为webpack.config.js。如果文件名不正确,需要将其修改为正确的文件名。总结起来,要解决这个问题,我们需要检查并确保以下几点:1. 检查项目文件中是否存在名为'./demo'的模块;2. 检查路径是否正确,并且该模块已经正确地引入到项目中;3. 检查webpack配置文件的文件名是否正确,应该为webpack.config.js。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [报错:Module not found: Error: Can’t resolve ‘./src’ in XXX](https://blog.csdn.net/Dutuy/article/details/120873068)[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_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
Module not found: Error: Can't resolve 'echarts/map/json/china.json' in
This error occurs when the module loader is unable to find the file 'china.json' in the file path 'echarts/map/json/'.
To resolve this error, you can try the following steps:
1. Check if the file 'china.json' exists in the specified file path 'echarts/map/json/'. If not, download the file from a trusted source and save it in the directory.
2. Check if the file path is correct. Make sure there are no spelling mistakes or incorrect directory names in the path.
3. Check if the module loader is configured properly to load the correct file path. This can be checked in the webpack.config.js file.
4. If you are using a package manager like npm or yarn, try reinstalling the package or clearing the cache and then reinstalling it.
5. If none of the above steps work, try using a different version of the package that includes the required file.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)