var crypto = require('crypto');
- 发布:2022-03-14 10:14
- 更新:2022-03-14 10:50
- 阅读:429
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win7
HBuilderX类型: Alpha
HBuilderX版本号: 3.3.11
手机系统: Android
手机系统版本号: Android 7.1.1
手机厂商: 小米
手机机型: 红米4x
页面类型: nvue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
var crypto = require('crypto');
reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stack ->Uncaught ReferenceError: require is not defined
var crypto = require('crypto');
reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stack ->Uncaught ReferenceError: require is not defined
预期结果:
var crypto = require('crypto');
var crypto = require('crypto');
实际结果:
var crypto = require('crypto');
reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stack ->Uncaught ReferenceError: require is not defined
var crypto = require('crypto');
reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stack ->Uncaught ReferenceError: require is not defined
bug描述:
3.3.11版
var crypto = require('crypto');
h5浏览器运行正常
真机运行报错如下:
reportJSException >>>> exception function:createInstanceContext, exception:white screen cause create instanceContext failed,check js stack ->Uncaught ReferenceError: require is not defined
FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866
NVUE 不支持
3***@qq.com (作者)
不就是普通的js,又不是组件。凭什么不支持?
2022-03-14 11:30
6***@qq.com
回复 3***@qq.com: 同样问题 ,真是太坑了,这样的好多第三方库都用不了了
2022-04-27 19:22