1***@163.com
1***@163.com
  • 发布:2024-03-27 15:37
  • 更新:2024-04-16 19:30
  • 阅读:90

【报Bug】dev:h5 does not provide an export named 'json' 报错

分类:uni-app

产品分类: uniapp/H5

PC开发环境操作系统: Windows

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

浏览器平台: 微信内置浏览器

浏览器版本: 新版

项目创建方式: CLI

CLI版本号: 3.0.0-4000620240325001

示例代码:
"@dcloudio/types": "3.4.8",  
    "@dcloudio/uni-automator": "3.0.0-4000620240325001",  
    "@dcloudio/uni-cli-shared": "3.0.0-4000620240325001",  
    "@dcloudio/uni-stacktracey": "3.0.0-4000620240325001",  
    "@dcloudio/vite-plugin-uni": "3.0.0-4000620240325001",  
    "@vue/runtime-core": "3.4.21",  
    "vite": "4.3.5",
   "@dcloudio/uni-app": "3.0.0-4000620240325001",  
    "@dcloudio/uni-app-plus": "3.0.0-4000620240325001",  
    "@dcloudio/uni-components": "3.0.0-4000620240325001",  
    "@dcloudio/uni-h5": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-alipay": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-baidu": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-jd": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-kuaishou": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-lark": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-qq": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-toutiao": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-weixin": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-xhs": "3.0.0-4000620240325001",  
    "@dcloudio/uni-quickapp-webview": "3.0.0-4000620240325001",  

操作步骤:
"@dcloudio/types": "3.4.8",  
    "@dcloudio/uni-automator": "3.0.0-4000620240325001",  
    "@dcloudio/uni-cli-shared": "3.0.0-4000620240325001",  
    "@dcloudio/uni-stacktracey": "3.0.0-4000620240325001",  
    "@dcloudio/vite-plugin-uni": "3.0.0-4000620240325001",  
    "@vue/runtime-core": "3.4.21",  
    "vite": "4.3.5",
   "@dcloudio/uni-app": "3.0.0-4000620240325001",  
    "@dcloudio/uni-app-plus": "3.0.0-4000620240325001",  
    "@dcloudio/uni-components": "3.0.0-4000620240325001",  
    "@dcloudio/uni-h5": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-alipay": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-baidu": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-jd": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-kuaishou": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-lark": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-qq": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-toutiao": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-weixin": "3.0.0-4000620240325001",  
    "@dcloudio/uni-mp-xhs": "3.0.0-4000620240325001",  
    "@dcloudio/uni-quickapp-webview": "3.0.0-4000620240325001",  

预期结果:

正常运行

实际结果:

今天新升级到 3.0.0-4000620240325001

dev:h5就直接报错

SyntaxError: The requested module '/wap/node_modules/@dcloudio/uni-cli-shared/lib/preprocess/lib/regexrules.js?v=e7db8eda' does not provide an export named 'json'

bug描述:

今天新升级到 3.0.0-4000620240325001

dev:h5就直接报错

SyntaxError: The requested module '/wap/node_modules/@dcloudio/uni-cli-shared/lib/preprocess/lib/regexrules.js?v=e7db8eda' does not provide an export named 'json'
2024-03-27 15:37 负责人:无 分享
已邀请:
JXWang

JXWang

感谢反馈,可以重装一下所有依赖试试

要回复问题请先登录注册