[Vuejs]-JS code working on localhost but not on production

0πŸ‘

βœ…

So I eventually identified the issue: when replacing

img v-if=”(item.stars.filter(e => e.star_type === 2).length > 0)”

with

img v-if=”(item.stars.filter(e => e.star_type == 2).length > 0)”

the code works on my server.

0πŸ‘

To resolve your issue, please visit your production link website through Chrome browser, when it opens click on F12 / or right click on page and select inspect to open chrome console. In your case most probably the console will display errors within JavaScript code, if you resolved these errors that appear, the site will work through the production mode beside that please make sure you covered / avoided the below points.

Points of why this problem could happen:

  1. you are browsing your production site through http proxy internet or via internal gate ways which is blocking some port used in your site
  2. there is error in your javascript (could be path to page content / images)
  3. you are using outdated browser
  4. timeout issue which is related to your server internet connection or even your client side internet connection
  5. you have not set proper access permission to your folder path used on your site
  6. you have not published all supported files to be viewed from your server
  7. licenses of used files could also show this issue
  8. your are browsering your website through VPN connection so please disable it and try again .
  9. issue on files extension/types which been used in your site content
  10. duplicating the load of used javascript library on your website (most probably this your problem although I cannot see it on the provided information for your question)
  11. conflict with used JavaScript library / versions on your websites

Hope this will resolve the issue for you .

Good luck

Leave a comment