question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'guess' of undefined

See original GitHub issue

am trying to use guess with laravel through a pre-defined routes file like in nuxt example so the setup is

  • guess-routes.json ex.
{
    "\/": {
        "\/login": 2,
        "\/about": 1
    },
    "\/about": {
        "\/contact-us": 1
    },
    "\/contact-us": {
        "\/": 1
    }
}
  • webpack
const {readFileSync} = require('fs')
const {GuessPlugin} = require('guess-webpack')

mix.webpackConfig({
    plugins: [
        new GuessPlugin({
            reportProvider() {
                return Promise.resolve(JSON.parse(readFileSync('./guess-routes.json')))
            }
        })
    ]
})
  • app.js
import {guess} from 'guess-webpack/api'
guess()
  • error demo

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
zipmecommented, Nov 5, 2018

hi @daliborgogic , after I disabled the pwa and remove all the cache the error seems to be gone, I guess it was the previous cached js caused the issue. Thanks for the help!!

0reactions
ctf0commented, Nov 7, 2018

@mgechev any news 🎈 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

moment.tz.guess() error · Issue #294 - GitHub
Running moment.tz.guess() produces the following error: Uncaught TypeError: Cannot read property 'join' of null(…)OffsetAt @ global.js:11363 ...
Read more >
Cannot read property 'tz' of undefined - Ember Moment ...
Uncaught TypeError : Cannot read property 'tz' of undefined. Could anyone tell me the proper way to load moment-timezone? Thanks!
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
What Causes TypeError: Cannot Read Property of Undefined. Undefined means that a variable has been declared but has not been assigned a value....
Read more >
cannot read properties of undefined (reading 'guess') - You.com
To solve the "Cannot read properties of undefined" error, make sure to insert the JS script tag at the bottom of the body....
Read more >
TypeError: Cannot read property 'name' of undefined - Training
Looking at the test, I can guess there is a property called “name” of some object you are referencing may be empty.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found