7.0.0 template not building for me

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
llnl-nif
Posts: 12
Joined: 26 Oct 2020, 18:23

09 Sep 2022, 18:39

I downloaded and unzipped the file serenity-react-7.0.0.zip from your website.

I ran "yarn install" with no problems.

But when I ran "yarn build", i got the following error:

Code: Select all

TypeScript error in /home/fisher23/devel/serenity-react-ts/src/App.tsx(417,14):
'Tooltip' cannot be used as a JSX component.
  Its instance type 'Tooltip' is not a valid JSX element.
    The types returned by 'render()' are incompatible between these types.
      Type 'React.ReactNode' is not assignable to type 'import("/home/fisher23/devel/serenity-react-ts/node_modules/@types/react-router/node_modules/@types/react/index").ReactNode'.  TS2786

    415 |     return (
    416 |         <div className={wrapperClass} onClick={onWrapperClick}>
  > 417 |             <Tooltip ref={copyTooltipRef} target=".block-action-copy" position="bottom" content="Copied to clipboard" event="focus" />
        |              ^
    418 | 
    419 |             <div ref={sidebar} className={sidebarClassName} onClick={onSidebarClick}
    420 |                 onMouseEnter={onSidebarMouseEnter} onMouseLeave={onSidebarMouseLeave}>
    
Any ideas what i am doing wrong?

Thanks,
John

llnl-nif
Posts: 12
Joined: 26 Oct 2020, 18:23

09 Sep 2022, 23:50

I believe I found the problem, and was able to get a build. Here was the key page:
https://stackoverflow.com/questions/717 ... 3#71828113

I added this to package.json, and it worked perfectly:

Code: Select all

"resolutions": {
    "@types/react": "17.0.0",
    "@types/react-dom": "17.0.0"
  },
So, in short, there is a bad package.json file in @types/react-dom that is causing a big failure in your template. This fixes it.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

12 Sep 2022, 12:21

Glad to hear, thanks a lot for the update!

Post Reply

Return to “Serenity - PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests