Gatsby: Uncaught (in promise) Error: page resources for / not found. Not rendering React

Created on 27 Jun 2020  路  6Comments  路  Source: gatsbyjs/gatsby

Description

I'm trying to use Gatsby with react-spring and react-three-fiber. I'm able to successfully get my example code to work while in develop mode. However, after a build and serving that page, I get an in-browser console error.

*Uncaught (in promise) Error: page resources for / not found. Not rendering React
at production-app.js:128 *

There are no build errors. The problem is not present when I change a.mesh to mesh. That initially led me to believe that this is a React-Spring and or three-fiber problem (and it still may very well be), but after checking issues here, I see other Gatsby users having similar "Not rendering React" errors in the built version and thought it would be wise to check.

Steps to reproduce

Build a project with Gatsby, React-spring/three using .

Minimal repo:
https://github.com/anim8rDev/meshError

Expected result

No errors and the Canvas properly rendered on the built project (again, it works fine in develop).

Actual result

Error:
*Uncaught (in promise) Error: page resources for / not found. Not rendering React
at production-app.js:128 *

Canvas does not render.

Environment

System:
OS: Windows 10 10.0.18362
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Binaries:
Node: 12.14.1 - D:\SOFTWARE\Applications\nodejs\node.EXE
npm: 6.13.4 - D:\SOFTWARE\Applications\nodejs\npm.CMD
Languages:
Python: 3.8.1
Browsers:
Edge: 44.18362.449.0
npmPackages:
gatsby: ^2.23.11 => 2.23.11
gatsby-plugin-root-import: ^2.0.5 => 2.0.5
npmGlobalPackages:
gatsby-cli: 2.12.37

page creation bug

Most helpful comment

We are chasing a similar error that says Uncaught (in promise) Error: page resources for / not found. Not rendering React.
It is getting incredibly difficult to know what the problem is. Any clues on how we go about debugging a problem like this?

All 6 comments

This took a lot of tracking down.. finally figured it out. The module is throwing an error:

loader.js:368 TypeError: _FrameLoop__WEBPACK_IMPORTED_MODULE_1__.a is not a constructor
    at Module.71bl (globals.js:8)
    at __webpack_require__ (bootstrap:84)
    at Object.<anonymous> (FrameLoop.js:1)
    at Object.dr3n (component---src-pages-index-js-cb68ff9b421ff186b0f0.js:11826)
    at __webpack_require__ (bootstrap:84)
    at Object.F45Q (index.js:1)
    at __webpack_require__ (bootstrap:84)
    at Module.RXBc (component---src-pages-index-js-cb68ff9b421ff186b0f0.js:11135)
    at __webpack_require__ (bootstrap:84)

However I don't totally understand why this is happening yet

We are chasing a similar error that says Uncaught (in promise) Error: page resources for / not found. Not rendering React.
It is getting incredibly difficult to know what the problem is. Any clues on how we go about debugging a problem like this?

Like @GreenOn, I am also trying to debug Uncaught (in promise) Error: page resources for /app/ not found. Not rendering React

In my case, /app/ is a client-only route that contains a client-side react app.

I have no problems when I run gatsby develop, but I get the error when running gatsby serve. There are no build errors reported. I read all the comments here https://github.com/gatsbyjs/gatsby/issues/19618 but none have helped.

Any suggestions on how to approach debugging this would be greatly appreciated.


UPDATE: I just debugged `Uncaught (in promise) Error: page resources for /app/ not found. Turns out the problems was with react-contextmenu (https://github.com/vkbansal/react-contextmenu/issues/284) which works fine client-side but breaks server-side during the gatsby build process.

My temporary solution for now is to use the compiled version of react-contextmenu in /node_modules/react-contextmenu/dist/react-context-menu.js

So instead of import { ContextMenu, MenuItem } from 'react-contextmenu'; I do import { ContextMenu, MenuItem } from 'react-contextmenu/dist/react-contextmenu';.

The way I debugged this was by removing all components from my app component, then adding them back one at a time until I found the component that was breaking the build.

Hiya!

This issue has gone quiet. Spooky quiet. 馃懟

We get a lot of issues, so we currently close issues after 60 days of inactivity. It鈥檚 been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 馃挭馃挏

No, I am also facing the same issue and not able to find the solution for it.

Yes, same here. It happens only in serve mode and when I pass a second time (or refresh) on the index page.
I have to reload with no cache, to see the page again.

Was this page helpful?
0 / 5 - 0 ratings