Skip to content

bug: New @ionic/react app does not build #20875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tiberriver256 opened this issue Mar 26, 2020 · 3 comments
Closed

bug: New @ionic/react app does not build #20875

Tiberriver256 opened this issue Mar 26, 2020 · 3 comments
Labels

Comments

@Tiberriver256
Copy link

Bug Report

Ionic version:

[x] 5.x

Current behavior:
Following the docs for creating a new Ionic React application:

npm install -g @ionic/cli native-run cordova-res
ionic start photo-gallery tabs --type=react --capacitor
cd photo-gallery
npm install @ionic/react-hooks @ionic/pwa-elements
** Modified index.tsx as requested**
ionic serve

Gives the following error:

[react-scripts] C:/my/photo-gallery/node_modules/@types/testing-library__react/node_modules/pretty-format/build/index.d.ts
[react-scripts] TypeScript error in C:/my/photo-gallery/node_modules/@types/testing-library__react/node_modules/pretty-format/build/index.d.ts(7
,13):
[react-scripts] '=' expected.  TS1005
[react-scripts]      5 |  * LICENSE file in the root directory of this source tree.
[react-scripts]      6 |  */
[react-scripts]   >  7 | import type * as PrettyFormat from './types';
[react-scripts]        |             ^
[react-scripts]      8 | /**
[react-scripts]      9 |  * Returns a presentation string of your `val` object
[react-scripts]     10 |  * @param val any potential JavaScript object

Expected behavior:
ionic serve should serve a stock application without an error

Steps to reproduce:
Follow steps above or read this guide

Ionic info:


Ionic:

   Ionic CLI       : 6.3.0 (C:\ProgramData\nvm\v12.15.0\node_modules\@ionic\cli)
   Ionic Framework : @ionic/react 5.0.6

Capacitor:

   Capacitor CLI   : 1.5.1
   @capacitor/core : 1.5.1

Utility:

   cordova-res : 0.11.0
   native-run  : 0.3.0

System:

   NodeJS : v12.15.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.13.4
   OS     : Windows 10


@ionitron-bot ionitron-bot bot added the triage label Mar 26, 2020
@Tiberriver256
Copy link
Author

Not sure if this is a viable workaround for others but I updated Typescript from 3.7.4 to 3.8 and the project actually works for now.

@liamdebeasi
Copy link
Contributor

Thanks for the issue. Looks like this is an issue with a dependency of Create React App: facebook/create-react-app#8714

@ionitron-bot
Copy link

ionitron-bot bot commented Apr 25, 2020

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants