我想使用react-native-aes-crypto
,但它需要react-native
。我安装了它,但它继续说找不到它。
我尝试重新安装它,添加他的依赖项,但是没有任何作用。
我的package.json:
{
"name": "neko_web",
"version": "0.1.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome": "^1.1.8",
"@fortawesome/react-fontawesome": "0.0.20",
"@trendmicro/react-sidenav": "^0.4.5",
"ajv": "^6.5.1",
"create-react-app": "^1.5.2",
"font-awesome": "^4.7.0",
"moment": "^2.22.2",
"react": "16.3.1",
"react-cookie": "^2.2.0",
"react-dom": "^16.4.0",
"react-icons-kit": "^1.1.5",
"react-moment": "^0.7.7",
"react-native": "^0.55.4",
"react-native-aes-crypto": "^1.2.1",
"react-router-dom": "^4.3.1",
"react-scripts": "1.1.4",
"react-sidenav": "^2.1.3"
},
"scripts": {
"start": "PORT=3005 react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
我import Aes from 'react-native-aes-crypto'
更新1:
我已经尝试将react-native的版本更改为0.55.0,不再需要进行任何审核修复,但它显示相同的错误。
答案 0 :(得分:1)
安装软件包react-native-cli
来解决该问题。
如果您想要另一个不需要react-native的软件包,请使用simple-encryptor
。