electrode-io / electrode-explorer

An Electrode application that showcases all of your components in a live demo
254 stars 17 forks source link

Cannot read property 'replace' of undefined #11

Closed dan3721 closed 7 years ago

dan3721 commented 7 years ago

clone, npm install, gulp dev, and I see this in the console:

Hapi.js server running at http://MORDOR:3000

However upon hitting http://MORDOR:3000, I see this error in the console:

Electrode ReduxRouterEngine Error: TypeError: Cannot read property 'replace' of undefined
    at escapeBadChars (D:\devel\ele\electrode-explorer\node_modules\electrode-redux-router-engine\lib\redux-router-engine.js:22:22)
    at ReduxRouterEngine.options.stringifyPreloadedState (D:\devel\ele\electrode-explorer\node_modules\electrode-redux-router-engine\lib\redux-router-engine.js:36:52)
    at _getReduxStoreInitializer.call.then (D:\devel\ele\electrode-explorer\node_modules\electrode-redux-router-engine\lib\redux-router-engine.js:132:24)
    at bound (domain.js:301:14)
    at runBound (domain.js:314:12)
    at tryCatcher (D:\devel\ele\electrode-explorer\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\devel\ele\electrode-explorer\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (D:\devel\ele\electrode-explorer\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromiseCtx (D:\devel\ele\electrode-explorer\node_modules\bluebird\js\release\promise.js:606:10)
    at Async._drainQueue (D:\devel\ele\electrode-explorer\node_modules\bluebird\js\release\async.js:138:12)
    at Async._drainQueues (D:\devel\ele\electrode-explorer\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (D:\devel\ele\electrode-explorer\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

Also noticed in Chrome Developer Tools that these two resources are 404s

purdrew commented 7 years ago

If it helps, I stepped through this a bit and found that store.getState() in redux-router-engine.js is returning undefined and then the stringifyPreloadedState (more precisely the escapeBadChars) is throwing that error.

dan3721 commented 7 years ago

Yep that helps. I'll try and hop around it locally. I'm surprised that no one else reported this as it appears not to work out of the box. Is anyone actually using electrode explorer? Doesn't look very active. Thanks for looking into it.

On Aug 4, 2017 6:22 PM, "Drew Walters" notifications@github.com wrote:

If it helps, I stepped through this a bit and found that store.getState() in redux-router-engine.js https://github.com/electrode-io/electrode/blob/master/packages/electrode-redux-router-engine/lib/redux-router-engine.js#L132 is returning undefined and then the stringifyPreloadedState (more precisely the escapeBadChars) is throwing that error.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/electrode-io/electrode-explorer/issues/11#issuecomment-320365932, or mute the thread https://github.com/notifications/unsubscribe-auth/AVTD0BmTNzFycxorP6eEfyHmLBKZgk4kks5sU5mIgaJpZM4Otv6p .

Sent from my Samsung SM-G955U using FastHub

purdrew commented 7 years ago

Yeah I'm in the same situation as you. Found the project the other day and wanted to play around with it but am hitting the same issue. I'm guessing some of the dependencies have updated and are now conflicting with this code.

dan3721 commented 7 years ago

Are you doing anything big with electrode? I'm test driving their stack and evaluating it for adoption. Running into more issues and the doc is lacking too.

On Aug 5, 2017 9:28 AM, "Drew Walters" notifications@github.com wrote:

Yeah I'm in the same situation as you. Found the project the other day and wanted to play around with it but am hitting the same issue. I'm guessing some of the dependencies have updated and are now conflicting with this code.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/electrode-io/electrode-explorer/issues/11#issuecomment-320443710, or mute the thread https://github.com/notifications/unsubscribe-auth/AVTD0I9sVgU6OqRILkUmmw-nffLay0Y4ks5sVG3tgaJpZM4Otv6p .

purdrew commented 7 years ago

Nope, not doing anything with electrode currently. Was looking around for component documentation frameworks and ran across this.

dan3721 commented 7 years ago

Opened a fresh issue with a more direct title.