GithubHelp home page GithubHelp logo

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 while I build the project and upload it in server. about quant-ux HOT 5 CLOSED

SharifTanvir avatar SharifTanvir commented on August 16, 2024
Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 while I build the project and upload it in server.

from quant-ux.

Comments (5)

KlausSchaefers avatar KlausSchaefers commented on August 16, 2024

Hi,

If I understood correctly you are not using the vue dev server. You use npm run build and use the build artifacts on a Webserver (NGINX etc)?

In this case you need to configure a proxy. The UI will make request to /api/... These request need to be send to a Quant-UX server. One of them is You can first try with mine https://v1.quant-ux.com`. If you want a complete standalone installation, you need to install the backend as well.

from quant-ux.

SharifTanvir avatar SharifTanvir commented on August 16, 2024

Yes, you understand it correctly.
How can I install the backend?

from quant-ux.

KlausSchaefers avatar KlausSchaefers commented on August 16, 2024

Please have a look here: https://github.com/KlausSchaefers/qux-java

from quant-ux.

KlausSchaefers avatar KlausSchaefers commented on August 16, 2024

If you have issues installing let me know. It should be pretty strain forward.

  1. Install Java 8

  2. Install Mongo

  3. Get mail server account

  4. updater config file

  5. Build fat jar with maven

  6. run far jar

from quant-ux.

SharifTanvir avatar SharifTanvir commented on August 16, 2024

my vue.config.js file is

var path = require('path');
module.exports = {
  publicPath: '/',
  devServer: {
    proxy: {
      '^/rest': {
        target: 'https://v1.quant-ux.com',
        ws: true,
        changeOrigin: true
      },
      '^/examples': {
        target: 'https://v1.quant-ux.com',
        ws: true,
        changeOrigin: true
      }
    }
  },
  chainWebpack: config => {
    config.resolve.alias.set('src', path.resolve('src'))
    config.resolve.alias.set('assets', path.resolve('src/assets'))
    config.resolve.alias.set('components', path.resolve('src/components'))
    config.resolve.alias.set('dojo', path.resolve('src/dojo'))
    config.resolve.alias.set('common', path.resolve('src/common'))
    config.resolve.alias.set('vommond', path.resolve('src/vommond'))
    config.resolve.alias.set('views', path.resolve('src/views'))
    config.resolve.alias.set('canvas', path.resolve('src/canvas'))
    config.resolve.alias.set('page', path.resolve('src/page'))
    config.resolve.alias.set('user', path.resolve('src/user'))
    config.resolve.alias.set('core', path.resolve('src/core'))
    config.resolve.alias.set('dash', path.resolve('src/dash'))
    config.resolve.alias.set('public', path.resolve('src/public'))
    config.resolve.alias.set('services', path.resolve('src/services'))
    config.resolve.alias.set('nls', path.resolve('src/nls'))
    config.resolve.alias.set('themes', path.resolve('src/themes'))
    config.resolve.alias.set('export', path.resolve('src/export'))
    config.resolve.alias.set('examples', path.resolve('src/examples'))
    config.resolve.alias.set('help', path.resolve('src/help'))
    config.resolve.alias.set('player', path.resolve('src/player'))
    config.resolve.alias.set('style', path.resolve('src/style'))
  }
}

Still, I am getting the previous error while I am trying to run it on my server after the build.
I am getting this after hitting the API. and the API response is :

body: ReadableStream
bodyUsed: true
headers: Headers {}
ok: true
redirected: false
status: 200
statusText: "OK"
type: "basic"
url: "https://prototype.tikweb.com/rest/login/"

In my browser's network option I am getting this image
Note: my browser's JavaScript is enabled.

from quant-ux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.