Open xiwangzishi opened 6 years ago
升级到 0.5.1 后,默认导出了 NVM。index.js 第 8 行
var NVM = require('./lib/nvm/nvm');
但是 NVM 里面默认引入了 native.js 。nvm.js 第 4 行
var native = require("./native");
native.js 会导致在浏览器环境下标准 Date 和 Math 对象被替换
而且会报 'Blockchain.block' is not defined.(因为Date对象依赖 Blockchain.block,而浏览器环境没有这个)
'Blockchain.block' is not defined.
建议默认不要导出 NVM
谢谢反馈,稍后我们会确认并修复该问题。
问题已经修复了,请更新一下~
升级到 0.5.1 后,默认导出了 NVM。index.js 第 8 行
但是 NVM 里面默认引入了 native.js 。nvm.js 第 4 行
native.js 会导致在浏览器环境下标准 Date 和 Math 对象被替换
而且会报
'Blockchain.block' is not defined.
(因为Date对象依赖 Blockchain.block,而浏览器环境没有这个)建议默认不要导出 NVM