Module not found: Error: Can't resolve 'querystring' in 'D:\project\PCBAUI\pcbnoticeui\node_modules\webpack-dev-server\client\utils'
时间: 2023-12-28 12:25:44 浏览: 46
根据提供的引用内容,出现"Module not found: Error: Can't resolve 'querystring' in 'D:\project\PCBAUI\pcbnoticeui\node_modules\webpack-dev-server\client\utils'"错误是因为在webpack-dev-server的客户端工具中找不到querystring模块。这个错误通常是由于缺少相关的依赖或配置问题导致的。
解决这个问题的方法有两种:
1. 确保安装了querystring模块的依赖。可以通过运行以下命令来安装:
```shell
npm install querystring --save
```
2. 检查webpack-dev-server的版本是否与webpack 4兼容。根据提供的引用,应该安装webpack-dev-server的3.x版本。可以通过运行以下命令来安装特定版本的webpack-dev-server:
```shell
npm install webpack-dev-server@3 --save-dev
```
请注意,根据提供的引用,还需要设置webpack的'mode'选项为'development'或'production',以启用默认配置。
相关问题
Module not found: Error: Can't resolve 'os' in 'D:\car\ceshi\cess2\node_modules\python-shell'
根据提供的引用内容,出现了两个不同的错误信息。第一个引用中出现了"Module not found: Error: Can’t resolve ‘swiper/vue’ in ‘D:\前端\Git\Git\Vue\music\node_modules\vue-awesome-swiper’"的错误,第二个引用中出现了"Module not found: Error: Can‘t resolve ‘path‘ in ‘/Users/wangabai/Desktop/学习/vue/code/vue3.2-element"的错误。
针对第一个引用中的错误,可以尝试删除"vue-awesome-swiper"文件夹,然后重新安装该模块。具体操作如下:
```shell
去node_modules中删除文件夹vue-awesome-swiper
```
针对第二个引用中的错误,可以尝试检查是否正确引入了"path"模块,并确保该模块已经正确安装。具体操作如下:
```shell
参考 Module not found: Error: Can‘t resolve ‘path‘ in ‘/Users/wangabai/Desktop/学习/vue/code/vue3.2-element
```
Module not found: Error: Can't resolve 'fs' in 'D:\project\test1\node_modules\html-docx-js\build'
这个错误通常是因为在浏览器环境中运行了一个 Node.js 模块,而浏览器中没有 `fs` 模块,因为它是 Node.js 的内置模块之一。你需要检查你的代码,看看是否在浏览器中引用了 Node.js 的模块。如果是这样,你需要使用其他方法来实现相同的功能,例如使用浏览器支持的 API 或使用一个特殊的库。如果你需要更具体的帮助,可以提供更多的上下文信息,我会尽力帮助你。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.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)