即使切换到稳定分支后,盖茨比仍会无限循环发展(无法读取未定义的属性'component --- <foo> -js')

时间:2019-11-28 02:09:51

标签: reactjs gatsby next.js

使用gatsby development时,正在运行的应用程序完全崩溃,但在运行gatsby build时似乎仍然可以正常工作。

尝试删除node_modules并重新安装依赖项。

Stacktrace:

The above error occurred in the <LocationProvider> component:
    in LocationProvider (created by Context.Consumer)
    in Location (at root.js:118)
    in Root (at root.js:127)
    in _default (at app.js:67)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit fb.me/react-error-boundaries to learn more about error boundaries.

Stacktrace:

commons.js:2825 Uncaught TypeError: Cannot read property 'component---src-pages-login-js' of undefined
    at createComponentUrls (commons.js:2825)
    at DevLoader.getResourceURLsForPathname (commons.js:2768)
    at getResourceURLsForPathname (commons.js:2900)
    at setPathResources (commons.js:13918)
    at Object../node_modules/gatsby-plugin-offline/gatsby-browser.js.exports.onRouteUpdate (commons.js:13932)
    at commons.js:893
    at Array.map (<anonymous>)
    at ./.cache/api-runner-browser.js.exports.apiRunner (commons.js:881)
    at onRouteUpdate (commons.js:3054)
    at RouteUpdates.componentDidMount (commons.js:3200)
    at RouteUpdates.componentDidMount (commons.js:54306)
    at commitLifeCycles (commons.js:39563)
    at commitLayoutEffects (commons.js:42797)
    at HTMLUnknownElement.callCallback (commons.js:17833)
    at Object.invokeGuardedCallbackDev (commons.js:17882)
    at invokeGuardedCallback (commons.js:17937)
    at commitRootImpl (commons.js:42535)
    at unstable_runWithPriority (commons.js:46583)
    at runWithPriority$2 (commons.js:29627)
    at commitRoot (commons.js:42384)
    at finishSyncRender (commons.js:41791)
    at performSyncWorkOnRoot (commons.js:41769)
    at scheduleUpdateOnFiber (commons.js:41160)
    at updateContainer (commons.js:44556)
    at commons.js:44980
    at unbatchedUpdates (commons.js:41895)
    at legacyRenderSubtreeIntoContainer (commons.js:44979)
    at render (commons.js:45116)
    at commons.js:1055

0 个答案:

没有答案