【发布时间】:2018-02-15 18:07:05
【问题描述】:
我正在尝试使用 react native 导入“crypto-js”。以下是代码
从“crypto-js”导入 CryptoJS;
使用此代码后出现以下错误:
错误:捆绑失败:错误:尝试从文件 /Users/hjw143/Documents/PropertyFinder/SearchPage.js 解析模块 crypto-js 时,已成功找到包 /Users/hjw143/Documents/PropertyFinder/node_modules/crypto-js/package.json。然而,这个包本身指定了一个无法解析的main 模块字段(/Users/hjw143/Documents/PropertyFinder/node_modules/crypto-js/index.js。事实上,这些文件都不存在:
怎么了?
【问题讨论】:
标签: ios reactjs react-native