NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

TSC Compile

Open NilsBaumgartner1994 opened this issue 3 years ago • 4 comments

Description

Tsc Compile with Bob Builder and Skiplibcheck

CodeSandbox/Snack link

none

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

NativeBase Version

3.4.3

Platform

  • [ ] Android
  • [ ] CRA
  • [X] Expo
  • [ ] iOS
  • [ ] Next

Other Platform

No response

Additional Information

Found 37 errors in 18 files.

Errors  Files
     1  node_modules/native-base/src/components/primitives/Box/index.tsx:100
     2  node_modules/native-base/src/components/primitives/Icon/createIcon.tsx:11
     2  node_modules/native-base/src/components/primitives/Icon/Icon.tsx:16
     4  node_modules/native-base/src/components/primitives/Icon/Icons/questionIconPath.tsx:5
     4  node_modules/native-base/src/components/primitives/Icon/SVGIcon.tsx:26
     6  node_modules/native-base/src/components/primitives/Icon/types.ts:9
     1  node_modules/native-base/src/components/primitives/Pressable/types.ts:1
     1  node_modules/native-base/src/components/primitives/Stack/HStack.tsx:23
     1  node_modules/native-base/src/components/primitives/Stack/Stack.tsx:86
     1  node_modules/native-base/src/components/primitives/Stack/VStack.tsx:24
     3  node_modules/native-base/src/components/primitives/Text/index.tsx:92
     1  node_modules/native-base/src/factory/component.tsx:19
     1  node_modules/native-base/src/utils/addTextAndPropsToStrings.tsx:7
     1  node_modules/native-base/src/utils/canUseDom.ts:4
     1  node_modules/native-base/src/utils/createContext.tsx:16
     5  node_modules/native-base/src/utils/getSpacedChildren.tsx:22
     1  node_modules/native-base/src/utils/useResponsiveQuery/ResponsiveQueryProvider.tsx:24
     1  node_modules/native-base/src/utils/wrapStringChild.tsx:11



node_modules/native-base/src/utils/getSpacedChildren.tsx:56:5 - error TS2740: Type 'FunctionComponentElement<any>' is missing the following properties from type 'Element': scopeId, children, component, dirs, and 9 more.

56     divider = React.cloneElement(divider, {
       ~~~~~~~

node_modules/native-base/src/utils/getSpacedChildren.tsx:63:10 - error TS2786: 'React.Fragment' cannot be used as a JSX component.
  Its return type 'ReactElement<any, string | JSXElementConstructor<any>>' is not a valid JSX element.

63         <React.Fragment key={child.key ?? `spaced-child-${index}`}>
            ~~~~~~~~~~~~~~

node_modules/native-base/src/utils/getSpacedChildren.tsx:75:10 - error TS2786: 'React.Fragment' cannot be used as a JSX component.
  Its return type 'ReactElement<any, string | JSXElementConstructor<any>>' is not a valid JSX element.

75         <React.Fragment key={child.key ?? `spaced-child-${index}`}>
            ~~~~~~~~~~~~~~

node_modules/native-base/src/utils/getSpacedChildren.tsx:78:50 - error TS2786: 'Box' cannot be used as a JSX component.
  Its return type 'ReactElement<any, string | JSXElementConstructor<any>>' is not a valid JSX element.

78             index < childrenArray.length - 1 && <Box {...spacingProp} />
                                                    ~~~

node_modules/native-base/src/utils/useResponsiveQuery/ResponsiveQueryProvider.tsx:24:6 - error TS2786: 'ResponsiveQueryContext.Provider' cannot be used as a JSX component.
  Its return type 'ReactElement<any, string | JSXElementConstructor<any>>' is not a valid JSX element.

24     <ResponsiveQueryContext.Provider value={value}>
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/native-base/src/utils/wrapStringChild.tsx:11:8 - error TS2786: 'Text' cannot be used as a JSX component.
  Its return type 'ReactElement<any, string | JSXElementConstructor<any>>' is not a valid JSX element.

11       <Text {...textProps}>{child}</Text>

NilsBaumgartner1994 avatar Apr 21 '22 08:04 NilsBaumgartner1994

Hi, @NilsBaumgartner1994 thanks for reporting the issue we will look into this.

Viraj-10 avatar May 02 '22 06:05 Viraj-10

Hey @NilsBaumgartner1994, I wanted to look into this issue, can you share more details about this if it still exists.

rayan1810 avatar Jun 02 '22 10:06 rayan1810

Hi, this error still persists.

NilsBaumgartner1994 avatar Aug 23 '22 10:08 NilsBaumgartner1994

{ "private": true, "name": "rocketmeals", "version": "1.0.0", "homepage": "./", "config": { "codepush_ios": "FireboltCasters/RocketMealsDemo-iOS", "codepush_android": "FireboltCasters/RocketMealsDemo-Android" }, "scripts": { "start": "react-native start", "preandroid": "npm run prebuild", "android": "npm run prebuild && cd ./android && ./gradlew clean && cd .. && react-native run-android", "android:build": "cd ./android && ./gradlew clean && ./gradlew assembleRelease && cd .. && cp ./android/app/build/outputs/apk/release/app-release.apk ./app-release.apk", "android:release": "npm run prebuild && react-native run-android --variant=release", "deploy:android": "npm run prebuild && appcenter codepush release-react -a ${npm_package_config_codepush_android} -m -t ''", "deploy:android:ci": "npm run prebuild && appcenter codepush release-react --token ${CODEPUSH_TOKEN_ANDROID} -a ${npm_package_config_codepush_android} -m -t ''", "pod": "cd ios && pod install && cd ..", "preios": "npm run pod && npm run prebuild", "ios": "react-native run-ios", "deploy:ios": "npm run pod && npm run prebuild && appcenter codepush release-react -a ${npm_package_config_codepush_ios} --plist-file ./ios/KitchenSinkappnativebase/Info.plist -m -t ''", "deploy:ios:ci": "npm run pod && npm run prebuild && appcenter codepush release-react --token ${CODEPUSH_TOKEN_IOS} -a ${npm_package_config_codepush_ios} --plist-file ./ios/KitchenSinkappnativebase/Info.plist -m -t ''", "deploy:native": "npm run deploy:android && npm run deploy:ios", "deploy:native:ci": "npm run deploy:android:ci && npm run deploy:ios:ci", "preweb": "npm run prebuild", "web": "expo start --web", "prebuild:web": "npm run prebuild", "build:web": "expo build:web --no-pwa --clear --dev", "prebuild:web:pwa": "npm run prebuild", "build:web:pwa": "expo build:web", "predeploy:web:local": "npm run build:web", "deploy:web:local": "npm run serve:web:local", "serve:web:local": "npx serve web-build --cors --single", "prebuild": "npm run licenseSummary && bash ./fix-for-web.sh", "licenseSummary": "npx license-checker --production --json --summary --direct --out thirdpartyLicense.json", "codepushkeys:ios": "appcenter codepush deployment list --app ${npm_package_config_codepush_ios} -k && echo 'Keys above for iOS ! Paste these in config.json'", "codepushgittoken:ios": "appcenter tokens create -d "${npm_package_config_codepush_ios}" && echo 'Add the API Token to your Git Secrets as: CODEPUSH_TOKEN_IOS'", "codepushkeys:android": "appcenter codepush deployment list --app ${npm_package_config_codepush_android} -k && echo 'Keys above for Android ! Paste these in config.json'", "codepushgittoken:android": "appcenter tokens create -d "${npm_package_config_codepush_android}" && echo 'Add the API Token to your Git Secrets as: CODEPUSH_TOKEN_ANDROID'", "codepushkeys": "npm run codepushkeys:ios && npm run codepushkeys:android", "codepushgittoken": "npm run codepushgittoken:ios && npm run codepushgittoken:android" }, "dependencies": { "@dicebear/adventurer": "^4.10.2", "@dicebear/adventurer-neutral": "^4.10.2", "@dicebear/avatars": "^4.10.3", "@dicebear/avatars-avataaars-sprites": "^4.10.2", "@dicebear/avatars-bottts-sprites": "^4.10.2", "@dicebear/avatars-identicon-sprites": "^4.10.2", "@dicebear/avatars-initials-sprites": "^4.10.2", "@dicebear/big-ears": "^4.10.2", "@dicebear/big-ears-neutral": "^4.10.2", "@dicebear/big-smile": "^4.10.2", "@dicebear/croodles": "^4.10.2", "@dicebear/croodles-neutral": "^4.10.2", "@dicebear/micah": "^4.10.2", "@dicebear/miniavs": "^4.10.2", "@dicebear/open-peeps": "^4.10.2", "@dicebear/personas": "^4.10.2", "@dicebear/pixel-art": "^4.10.2", "@dicebear/pixel-art-neutral": "^4.10.2", "@react-native-async-storage/async-storage": "^1.17.3", "@react-native-community/masked-view": "0.1.10", "@react-navigation/drawer": "^5.0.0", "@react-navigation/native": "^5.9.4", "@react-navigation/stack": "^5.14.5", "@types/axios": "^0.14.0", "@types/node": "^11.15.35", "@types/react": "^16.9.55", "@types/react-dom": "^16.9.9", "axios": "^0.21.4", "ci": "^2.1.1", "cross-env": "^7.0.3", "cssom": "^0.5.0", "csv": "^5.5.0", "easy-peasy": "^5.0.4", "expo": "~40.0.0", "expo-cli": "^4.11.0", "expo-clipboard": "~1.0.1", "expo-image-picker": "~9.2.0", "expo-linear-gradient": "^9.1.0", "expo-sharing": "~8.5.0", "expo-splash-screen": "~0.8.0", "expo-status-bar": "~1.0.3", "expo-updates": "~0.4.0", "favicons": "^6.2.0", "js-cookie": "^3.0.1", "kitcheningredients": "^0.2.0", "lorem-ipsum": "^2.0.4", "lottie-ios": "^3.2.3", "lottie-react": "^2.2.1", "lottie-react-native": "^5.0.1", "native-base": "^3.3.0", "npm": "^6.14.10", "react": "", "react-dom": "16.13.1", "react-native": "", "react-native-code-push": "^6.2.1", "react-native-color": "^0.0.10", "react-native-device-info": "^8.7.1", "react-native-gesture-handler": "~1.8.0", "react-native-image-zoom-viewer-fixed": "^3.2.5", "react-native-markdown-display": "^7.0.0-alpha.2", "react-native-reanimated": "~1.13.0", "react-native-safe-area-context": "3.1.9", "react-native-screens": "~2.15.2", "react-native-svg": "^12.1.1", "react-native-unimodules": "~0.12.0", "react-native-web": "~0.13.12", "react-native-web-webview": "^1.0.2", "react-native-webview": "11.14.4", "react-router-dom": "^5.3.0", "react-signature-canvas": "^1.0.3", "react-transition-group": "^4.4.2", "regenerator-runtime": "^0.10.5", "sass-loader": "^7.1.0", "serve": "^12.0.1", "styled-components": "^5.3.0", "styled-system": "^5.1.5", "svg-inline-react": "^3.2.1", "sync-storage": "^0.4.2", "tinycolor2": "^1.4.2", "ts-keyof": "^1.3.0", "typescript": "^4.1.3", "universal-cookie": "^4.0.4" }, "devDependencies": { "@commitlint/config-conventional": "^11.0.0", "@directus/sdk": "^9.0.0", "@react-native-community/eslint-config": "^2.0.0", "@release-it/conventional-changelog": "^2.0.0", "@types/jest": "^26.0.0", "@types/react": "^16.9.55", "@types/react-native": "0.63.4", "commitlint": "^11.0.0", "eslint": "^7.2.0", "eslint-config-prettier": "^7.0.0", "eslint-plugin-prettier": "^3.1.3", "husky": "^6.0.0", "jest": "^26.0.1", "pod-install": "^0.1.0", "prettier": "^2.0.5", "react": "^16.9.55", "react-native": "0.63.4", "react-native-builder-bob": "^0.18.0", "release-it": "^14.2.2", "typescript": "^4.1.3" } }

NilsBaumgartner1994 avatar Aug 23 '22 10:08 NilsBaumgartner1994