question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: cannot use IonItem with IonRouter on React-Tests

See original GitHub issue

Bug Report

Ionic version:

[ ] 4.x [x] 5.x

Current behavior: Cannot use IonItem with IonRouter on React Tests at “/packages/react/test/test-app/”. Getting error: Property 'routerAnimation' is missing in type '{ children: Element[]; button: true; }' but required in type 'Pick<IonItem, "color" | "button" | "disabled" | "lines" | "mode" | "href" | "routerAnimation" | "rel" | "target" | "download" | "type" | "detail" | "detailIcon">'. TS2741

Expected behavior: IonRouter should get the property routerAnimation.

Steps to reproduce: See steps: https://github.com/ionic-team/ionic-framework/issues/22342#issuecomment-723108406

Related code: https://github.com/ionic-team/ionic-framework/tree/master/packages/react/test/test-app

Other information: Issue #22342 cannot be fixed without testing and fixing this issue…

Ionic info: Cannot give ionic info because of working in the Source Code of Ionic Framework.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
BerkeArascommented, Mar 2, 2021

@liamdebeasi It works now. It has to be like this:

  1. Update the correct version in /packages/react-router/test-app/package.json and /packages/react-router/test-app/build.sh
  2. sh build.sh in /packages/react-router/test-app/
  3. npm install in /packages/react-router/test-app/
  4. npm start in /packages/react-router/test-app/

Unfortunately on my MacBook npm install did not work, but npm install --force. Thanks for helping, I can now focus on #22342

1reaction
liamdebeasicommented, Mar 2, 2021

For 1) make sure you have run npm install first.

For 2) follow these steps:

  1. In the test-app directory, change ionic-react-5.5.0 in both package.json and build.sh to ionic-react-5.5.5. This assume you have the latest master.
  2. Run ./build.sh. This assumes you have installed dependencies in the react directory first.

The steps here are not the most intuitive, so I can document these somewhere in the readme.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic React cannot use flexbox in IonItem or load external .css
Am I missing something?? Problem 2. I decided to go with in-line styling because I could not load the .css part. First I...
Read more >
ion-item - Ionic Framework
ion-item elements for iOS/Android contain text, icons, images, and other custom elements. They're placed in a list and can be input, deleted, edited, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found