Error with Vue.js deploy

Asked

Viewed 155 times

0

api.min.js:2 GET https://api.opmnstr.com/v1/optin/13439/673828 410
(anonymous) @ api.min.js:2
Ye.send @ api.min.js:2
getCampaigns @ api.min.js:2
t.init @ api.min.js:2
o.onload.o.onreadystatechange @ pag:180
load (async)
(anonymous) @ pag:180
(anonymous) @ pag:180
api.min.js:2 [OptinMonster] The campaign could not be retrieved. The following error was returned: A campaign with the ID 673828 does not exist.

This is the error message that appears on the console when I refresh the page, well, I used "npm run build" to create a version to deploy on 000webhost, uploaded the files and opened the link, until then everything right, navigates between pages and everything, the problem is when directly opening the page url, error if using the buttons the site browses, but when updating error and says that the page does not exist.
example with. so it works, and if you click to go to page 1 it will
example.com/pagina1 however, the site does not find the page

Edit 1:
Vue router:

import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import pagina from '@/components/pagina'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    }, {
      path: '/pag',
      name: 'pagina',
      component: pagina
    }
  ]
})
  • Are you using the router? If possible post it, that only with this information gives only to know that Optinmonster has some problem

  • I just edited

1 answer

1


  • That’s what I wanted to see, if you have HTML5 History Mode enabled you have to redirect all requests to index.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.