【发布时间】:2021-01-06 05:46:17
【问题描述】:
我克隆并尝试在 Windows 机器中启动一个旧的 React Native 项目。
我跑了npm install,它似乎成功安装了所有东西,除了当它到达react-native时,这是我的package.json文件:
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"expo": "^33.0.0",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"react-native-web": "^0.11.4",
"react-navigation": "^3.11.0"
},
"devDependencies": {
"babel-preset-expo": "^5.1.1"
},
"private": true
}
我收到以下错误:
npm WARN tarball tarball data for react-native@https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz (sha512-/qr69yNpTvBiHpepa1ufF43cCMtUzpaQxmCwG6Kz5Z9XqyoEP1lJaJ/BNFj/Bp9+1+LIHwvrDoPBnfQ==) seems to be corrupted. Trying one more time.
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Projects\rn-casts-master\rn-starter\node_modules\.staging\react-native-3c53bfaf\Libraries\Components\Touchable\__mocks__' npm WARN tar ENOENT: no such file or directory, lstat 'C:\Projects\rn-casts-master\rn-starter\node_modules\.staging\react-native-3c53bfaf\Libraries\Components\Touchable'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Projects\rn-casts-master\rn-starter\node_modules\.staging\react-native-3c53bfaf\Libraries\Components'
我没有看到它是一个已弃用的版本: https://docs.expo.io/workflow/upgrading-expo-sdk-walkthrough/
这里有更多经验的人可以指导我这些文件是怎么回事?
【问题讨论】:
标签: react-native expo