通过npm install baidu-aip-sdk导入到项目中,在android中运行报下面的错
Error: Unable to resolve module crypto from G:\IdeaProjects\chairApp\node_modules\baidu-aip-sdk\src\http\httpClientVoiceASR.js: crypto could not be found within the project or in these directories:
node_modules
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
17 |
18 | const HttpClient = require('./httpClient');
> 19 | const crypto = require('crypto');
但是在项目中已经导入crypto相关包,该怎么办呢
收藏
点赞
0
个赞
请登录后评论
TOP
切换版块
android 建议直接使用android sdk https://ai.baidu.com/sdk#asr