ignite icon indicating copy to clipboard operation
ignite copied to clipboard

type error when creating new project

Open muratti32 opened this issue 3 years ago • 1 comments

What's going on?

I am getting these linter errors in the project I just created with ignite cli, what could be the reason.

No overload matches this call. Overload 1 of 2, '(props: ViewProps | Readonly<ViewProps>): View', gave the following error. Type '{ children: Element[]; testID: string; style: ViewStyle; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<View> & Readonly<ViewProps>'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<View> & Readonly<ViewProps>'. Overload 2 of 2, '(props: ViewProps, context: any): View', gave the following error. Type '{ children: Element[]; testID: string; style: ViewStyle; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<View> & Readonly<ViewProps>'. Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<View> & Readonly<ViewProps>'.ts(2769)

Steps to reproduce

  1. I create new project
  2. I get the type errors seen in the below in components such as View and Safeareview

npx ignite-cli doctor results:

` System platform darwin
arch x64
cpu 8 cores Apple M1
directory ignte /Users/muratulug/Desktop/react_native_workspace/ignte

JavaScript (and globally-installed packages) node 16.13.2 /usr/local/bin/node npm 8.1.2 /usr/local/bin/npm
@angular/cli 13.1.2
@aws-amplify/cli 6.3.1
@react-native-community/cli 7.0.3
corepack 0.10.0
eslint-plugin-import 2.25.4
expo-cli 4.0.13
gatsby-cli 3.10.0
node-gyp 8.4.1
node-pre-gyp 0.11.0
nodeman 1.1.2
nodemon 2.0.15
npm 8.1.2
prettier 2.5.1
rimraf 3.0.2
serve 12.0.0
sqlite3 5.0.2
ts-node 10.5.0
typeorm 0.2.44
yarn 1.22.17
yarn 1.22.17 /usr/local/bin/yarn expo-cli 4.4.8
ios-deploy 1.11.4
react-devtools 4.10.0
react-native-rename 2.8.1

Ignite ignite-cli 6.12.2 /Users/muratulug/.npm/_npx/e31027f3785124a8/node_modules/.bin/ignite
ignite src build /Users/muratulug/.npm/_npx/e31027f3785124a8/node_modules/ignite-cli/build

Android java 11.0.11 /usr/bin/java
android home - /Users/muratulug/Library/Android/sdk

iOS xcode 13.1
cocoapods 1.11.2 /usr/local/bin/pod `

muratti32 avatar May 16 '22 07:05 muratti32

@muratti32, thank you very much for logging this error. Per your npx ignite-cli doctor report, it looks like you're on ignite v6.12.2. Ignite is currently on v7.12.0, and I can confirm I'm not running into that issue with a newly ignited app (using TS v4.7.3).

Can you try with the latest version of ignite and let us know if you're still running into this issue?

mazenchami avatar Jun 20 '22 15:06 mazenchami

Going to close this issue due to no activity. @muratti32 please try the newest version of the ignite and if you still encounter this problem feel free to open a new issue. Thank you.

frankcalise avatar Aug 23 '22 21:08 frankcalise

Sometimes I run into this issue and at times I don't And with mine, I get squiggly red lines on certain element tags(Not all). Mostly the first tags

System platform win32
arch x64
cpu 4 cores Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz directory FitnessProject C:\Users\benja\Desktop\React-Native\FitnessProject

JavaScript (and globally-installed packages) node 20.9.0 C:\Program Files\nodejs\node.EXE npm 9.4.2 C:\Users\benja\AppData\Roaming\npm\npm.CMD
@aws-amplify/cli 10.5.2
@expo/ngrok 4.1.0
create-expo-app 1.3.2
expo-cli 6.3.2
firebase-tools 9.2.2
ignite-cli 8.9.2
npm-check-updates 12.5.3
npm 9.4.2
sass 1.32.8
stepzen 0.24.0
yarn 1.22.19
yarn 1.22.19 C:\Users\benja\AppData\Roaming\npm\yarn.CMD create-expo-app 2.1.1
react-native-cli 2.0.1
pnpm - not installed expo 48.0.21 managed

Ignite ignite-cli 8.9.2 C:\Users\benja\AppData\Roaming\npm\ignite.CMD ignite src build C:\Users\benja\AppData\Roaming\npm\node_modules\ignite-cli\build

Android java 11.0.17 C:\Program Files\Eclipse Adoptium\jdk-11.0.17.8-hotspot\bin\java.EXE
android home - C:\Users\benja\AppData\Local\Android\Sdk

Tools git git version 2.40.0.windows.1 C:\Program Files\Git\cmd\git.EXE

HammBen avatar Nov 21 '23 20:11 HammBen