Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

React Build it not working


I tried to depoy React version (demo7) on vercel but it seems to be not working. I tried with both the edited version and the freshly downloaded version, and both seemed to show the same issue/error.

Fresh Install -

Edited Version -

None of them are working after deployment but these are working well on the dev mode in local host. How do i fix this issue?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hello?? I need faster reply???



Hi Advith,

Sorry for the delay.

If you are using Metronic v8.2.0 or lower versions with CRA, you need to update the homepage property in package.json.


"homepage": "/",


Regards,
Lauris Stepanovs,
Keenthemes Support Team



There is no file called "vite.config.ts" i checked with both edited version and fresh installed source file.



Hi Advith,

Thank you for reaching out to us.

On your previews, I see that images are still referring /metronic8/react/demo6/ which means that you haven't updated the base path property in vite.config.ts.

To fix this problem do the following:

  1. Update base property to from /metronic8/react/demo6/ to / in vite.config.ts.
  2. Globally in your project find and replace toAbsoluteUrl('/ with toAbsoluteUrl('.
  3. Rebuild and redeploy your project.



Regards,
Lauris Stepanovs,
Keenthemes Support Team
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(