Module not found: Error: Can't resolve 'hls.js' in 'E:\文件\网易云音乐移动端项目\源码\wangyi_music\node_modules\vue-aplayer\dist'
时间: 2023-10-09 19:11:09 浏览: 163
引用:这个报错信息是vue-video-player里面的某个模块找不到,解决方法可以在webpack.config.js文件中配置externals字段,并添加'hls.js'作为外部依赖。
引用:另一种解决方法是在命令行中运行'webpack(-cli) --help'来获取更多信息。该错误信息通常是由于找不到入口模块导致的,可以尝试解决该问题并找到正确的入口路径。
引用:具体解决代码可以在webpack的configureWebpack字段中添加externals: 'hls.js'来忽略该模块的加载。
对于你提到的报错信息"Module not found: Error: Can't resolve 'hls.js' in 'E:\文件\网易云音乐移动端项目\源码\wangyi_music\node_modules\vue-aplayer\dist'",这个错误表示在路径'E:\文件\网易云音乐移动端项目\源码\wangyi_music\node_modules\vue-aplayer\dist'中找不到'hls.js'模块。为了解决该问题,你可以尝试以下几个步骤:
1. 确保你的项目中已经安装了'hls.js'模块。你可以使用命令npm install hls.js来安装该模块。
2. 检查路径是否正确,确认'hls.js'模块确实存在于该路径中。
3. 如果路径正确且模块已经安装,尝试清除缓存并重新安装所有依赖项。你可以使用命令npm cache clean --force来清除缓存,然后再运行npm install来重新安装依赖项。
相关问题
ERROR in ./src/App.js 5:0-74 Module not found: Error: Can't resolve 'react-router-dom' in 'C:\Users\烟火阑珊倚人间\try1\src' ERROR in ./src/App.js 6:0-30 Module not found: Error: Can't resolve 'antd' in 'C:\Users\烟火阑珊倚人间\try1\src' ERROR in ./src/index.js 6:0-39 Module not found: Error: Can't resolve 'react-redux' in 'C:\Users\烟火阑珊倚人间\try1\src' ERROR in ./src/index.js 9:0-28 Module not found: Error: Can't resolve 'antd/dist/antd.css' in 'C:\Users\烟火阑珊倚人间\try1\src' ERROR in ./src/pages/ItemsPage.js 6:0-38 Module not found: Error: Can't resolve 'react-redux' in 'C:\Users\烟火阑珊倚人间\try1\src\pages' ERROR in ./src/pages/ItemsPage.js 7:0-42 Module not found: Error: Can't resolve '../redux/api' in 'C:\Users\烟火阑珊倚人间\try1\src\pages' ERROR in ./src/redux/store.js 3:0-53 Module not found: Error: Can't resolve 'redux' in 'C:\Users\烟火阑珊倚人间\try1\src\redux' ERROR in ./src/redux/store.js 4:0-42 Module not found: Error: Can't resolve 'redux-thunk' in 'C:\Users\烟火阑珊倚人间\try1\src\redux'
These errors indicate that some modules are missing in your project. It seems like you need to install the required dependencies.
To resolve these errors, you can run the following command in the root directory of your project:
```
npm install react-router-dom antd react-redux redux redux-thunk
```
This command will install the necessary packages (`react-router-dom`, `antd`, `react-redux`, `redux`, `redux-thunk`).
After the installation is complete, try running your project again. The missing module errors should be resolved.
If you have any further questions, feel free to ask!
ERROR Failed to compile with 1 error 14:38:25 error in ./src/router/index.js Module not found: Error: Can't resolve '../views/error-pages/404.vue' in 'E:\Vue CLI\wyd\src\router' ERROR in ./src/router/index.js 5:0-52 Module not found: Error: Can't resolve '../views/error-pages/404.vue' in 'E:\Vue CLI\wyd\src\router' @ ./src/main.js 3:0-30 9:2-8 webpack compiled with 1 error
很抱歉,我并不是一个程序员,无法处理这个错误。但是根据错误信息来看,似乎是在引用 '../views/error-pages/404.vue' 这个文件时出现了问题,可能是路径有误或者文件不存在。你可以检查一下路径是否正确,文件是否存在,并且确保你的代码中正确地引用了这个文件。如果还有问题,建议你请教一些专业的程序员或者在相关的论坛上提问。
阅读全文