guess icon indicating copy to clipboard operation
guess copied to clipboard

Cannot read property 'source' of undefined

Open travis-r6s opened this issue 4 years ago • 3 comments

I'm trying to create a plugin for Gridsome (based on the Nuxt demos), and it works perfectly in development mode. However, when I try to build a project I get this error:

92% chunk asset optimization TerserPlugin 
/path-to-project/Gridsome/plugins/gridsome-plugin-guess-js/node_modules/guess-webpack/dist/guess-webpack/main.js:660 compilation.assets[mainName] = new ConcatSource(stats.compilation.assets['./output.js'], '\n', old.source());

TypeError: Cannot read property 'source' of undefined

The Guess options are as below:

const guessOptions = {
    GA: viewId,
    minimumThreshold,
    jwt,
    // Hints Guess to not perform pre-fetching and delegate this logic to its consumer.
    runtime: {
      delegate: true
    },
    // Guess does not have to collect the routes and the corresponding bundle entry points.
    routeProvider: false
}

Would be glad of some help as to what the issue is here?

travis-r6s avatar Jan 28 '20 17:01 travis-r6s

Would you share a minimal demo where we can reproduce the problem?

mgechev avatar Jan 28 '20 18:01 mgechev

Please see https://github.com/thetre97/gridsome-demo-guess, where I have replicated what my intended plugin does...

travis-r6s avatar Jan 28 '20 19:01 travis-r6s

Hello @mgechev , any update on this?

travis-r6s avatar May 13 '20 20:05 travis-r6s