尝试将本机流程项目转换为打字稿的打字稿错误

时间:2019-11-24 21:44:29

标签: typescript react-native flowtype

相对较新,具有react-native ...

尝试将本机流程项目转换为本机打字稿项目。 设法找出其他编译错误,但得到以下提示:

行:

import { ____ViewStyleProp_Internal as Style } from "react-native/Libraries/StyleSheet/StyleSheetTypes";

错误:

Cannot find module 'react-native/Libraries/StyleSheet/StyleSheetTypes'.ts(2307)

似乎没有在react-native下找到Libraries文件夹...(?) 我在AppData \ Roaming \ npm \ node_modules \ react-native-cli \ node_modules下安装react-native没有Libraries文件夹... Libraries文件夹位于哪里?

当前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": {
    "autobind-decorator": "^2.4.0",
    "expo": "^35.0.0",
    "native-base": "^2.13.8",
    "react": "16.8.3",
    "react-dom": "16.8.3",
    "react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
    "react-native-web": "^0.11.7",
    "react-navigation": "^4.0.10"
  },
  "devDependencies": {
    "@types/react": "^16.8.23",
    "@types/react-native": "^0.57.65",
    "babel-preset-expo": "^7.1.0",
    "typescript": "^3.6.3"
  },
  "private": true
}

思想。

0 个答案:

没有答案