Static GitHub Issues

[1888] SPA build failing with shopify-buy sdk

prev: change the server error page
next: Regression? Error: Cannot find module 'pug'

When i build my project containing shopify-buy sdk i am not able to open the SPA due to following error:

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

So i have tried to build this in a clean vuejs project and not able to reproduce the problem, so i would assume it may be related to nuxt and the build process within.

I have included a minimal workable example here: https://github.com/maziarz/nuxt-netlify-test And demo here: https://florist-coder-21347.netlify.com/

Please move your attention to the store file where shopify is instantiated.

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