Static GitHub Issues

[1866] SPA deployed on netlify not loading

prev: Why Nuxt adds backface-visibility: hidden?
next: No contributing instructions?

I have deployed my page on netlify, which is not loading, instead i get following error which i have zero success debugging:

client.js:60 [nuxt] Error while initializing app TypeError: i.Config is not a constructor
    at Object.s (https://nuxt.testpage.com/_nuxt/app.425851a1d95d8b38d6b4.js:2:117827)
    at J2Ti.k (https://nuxt.testpage.com/_nuxt/app.425851a1d95d8b38d6b4.js:2:9751)
    at https://nuxt.testpage.com/_nuxt/app.425851a1d95d8b38d6b4.js:2:111429
    at r (https://nuxt.testpage.com/_nuxt/app.425851a1d95d8b38d6b4.js:2:12416)
    at Generator._invoke (https://nuxt.testpage.com/_nuxt/app.425851a1d95d8b38d6b4.js:2:13461)
    at Generator.e.(anonymous function) [as next] (https://nuxt.testpage.com/_nuxt/app.425851a1d95d8b38d6b4.js:2:12595)
    at r (https://nuxt.testpage.com/_nuxt/common.e173e702484a35932444.js:2:118568)
    at https://nuxt.testpage.com/_nuxt/common.e173e702484a35932444.js:2:118716
    at new Promise (<anonymous>)
    at new e (https://nuxt.testpage.com/_nuxt/common.e173e702484a35932444.js:2:130100)
(anonymous) @ client.js:60

UPDATE:

So after much debugging i realized that the problem was due to my shopify-buy package. The code has been untouched since i migrated from a standard vuejs project to nuxt, so i was assuming it would just work as is.

Basically the problem arises when the project has been build while the state contains the shopify client variable: https://github.com/maziarz/nuxt-netlify-test/blob/master/store/index.js#L5:

import Vue from 'vue'
import Client, { Config } from 'shopify-buy'

export const state = () => ({
  $shopifyClient: new Client(
    new Config({
      domain: 'graphql.myshopify.com',
      storefrontAccessToken: 'dd4d4dc146542ba7763305d71d1b3d38'
    })
  )
})

Online demo of the build: https://florist-coder-21347.netlify.com/

I cannot reproduce this error in a clean VueJS project.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This bug report is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1676">#c1676</a>)</em></sub></div>