6***@gmail.com
6***@gmail.com
  • 发布:2021-10-28 08:36
  • 更新:2022-04-01 20:27
  • 阅读:4342

Cannot find module '@dcloudio/uni-components/style/audio.css' Require stack:

分类:uni-app

产品分类: uniapp/H5

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: windows 10

HBuilderX类型: 正式

HBuilderX版本号: 3.2.9

浏览器平台: Chrome

浏览器版本: 94.0.4606.81

项目创建方式: HBuilderX

操作步骤:
<!-- audio -->  
        <view class="page-section page-section-gap" style="text-align: center;">  
            <audio style="text-align: left" :src="current.src" :poster="current.poster" :name="current.name"  
                :author="current.author" :action="audioAction" controls></audio>  
        </view>  
<script setup>  
import {ref} from 'vue'  
    const current = ref({  
        poster: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/7fbf26a0-4f4a-11eb-b680-7980c8a877b8.png',  
        name: '致爱丽丝',  
        author: '暂无',  
        src: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-hello-uniapp/2cc220e0-c27a-11ea-9dfb-6da8e309e0d8.mp3',  
    })  
    const audioAction = ref({  
        method: 'pause'  
    })  
</script>

预期结果:

生成正常的一个音频

实际结果:

代码报错

bug描述:

Cannot find module '@dcloudio/uni-components/style/audio.css'  
Require stack:  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\utils.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\app\pages\definePage.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\app\pages\index.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\app\index.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\json\index.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\env\define.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\env\index.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\uni-cli-shared\dist\index.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\vite-plugin-uni\dist\cli\utils.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\vite-plugin-uni\dist\cli\index.js  
- D:\soft\codeTools\HBuilderX.2.8.11.20200907.full\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\vite-plugin-uni\bin\uni.js
2021-10-28 08:36 负责人:无 分享
已邀请:
linyz23

linyz23

我也遇到了

y***@qq.com

y***@qq.com

遇到加1·求解决方法

DCloud_UNI_Anne

DCloud_UNI_Anne

audio组件很久前已不再维护,建议使用能力更强的uni.createInnerAudioContext()详见文档

  • 7***@qq.com

    创建了这个上下文对象应该怎么使用呢?它也不像audio组件一样可以挂载

    2022-06-23 17:09

该问题目前已经被锁定, 无法添加新回复