Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error Cannot read properties of undefined (reading 'id') #446

Open
ZeldOcarina opened this issue Jul 18, 2022 · 0 comments
Open

error Cannot read properties of undefined (reading 'id') #446

ZeldOcarina opened this issue Jul 18, 2022 · 0 comments

Comments

@ZeldOcarina
Copy link

I am trying to build a fairly large Gatsby project with AirTable and I am sourcing (34 tables).
It all works smoothly in development but when I try to build, I always get this weird error:

error Cannot read properties of undefined (reading 'id')

The only workaround I found is to build locally, it fails a couple of times and then it goes through, then to move the built static files to my dedicated server and serve the files with NGINX.

I've tried with Vercel, DeployHQ, Netlify and now to even build the instance with Jenkins on a very powerful dedicated server, but, when trying to use services, it seems to always fail with this same error (or out of heap memory for Netlify and DeployHQ, that's due to their memory build limitations).

I've tried opening this issue with Gatsby and they said it's probably something with this plugin.

Attached the complete build log, public GitHub repo and the staging website I'm building, thanks in advance for your help!

GitHub Repo:
https://github.com/ZeldOcarina/ncuc/

Staging Instance:
https://ncuc.monarchy.io/

Build Logs

  • yarn build
    yarn run v1.22.19
    warning ../../../package.json: No license field
    $ NODE_OPTIONS=--max-old-space-size=8192 gatsby build
    success compile gatsby files - 1.687s
    success load gatsby config - 0.338s
    success load plugins - 1.012s
    success onPreInit - 0.013s
    success delete worker cache from previous builds - 0.002s
    success initialize cache - 0.306s
    success copy gatsby files - 0.210s
    success Compiling Gatsby Functions - 0.268s
    success onPreBootstrap - 0.283s
    success createSchemaCustomization - 0.007s

fetch all Airtable rows from 34 tables: 1.281s
success Checking for changed pages - 0.000s
success source and transform nodes - 33.226s
info Writing GraphQL type definitions to /var/lib/jenkins/workspace/NCUC/ncuc/.cache/schema.gql
success building schema - 0.638s
success createPages - 0.001s
success createPagesStatefully - 0.274s
info Total nodes: 1603, SitePage nodes: 35 (use --verbose for breakdown)
success Checking for changed pages - 0.000s
success onPreExtractQueries - 0.000s
success extract queries from components - 2.815s
success write out redirect data - 0.257s
warning The icon(src/images/logo.svg) you provided to 'gatsby-plugin-manifest' is not square.
The icons we generate will be square and for the best results we recommend you provide a square icon.

success Build manifest and related icons - 0.190s
success onPostBootstrap - 0.193s
info bootstrap finished - 44.630s
success write out requires - 0.006s
success Building production JavaScript and CSS bundles - 3.149s
success Building HTML renderer - 18.636s
success Execute page configs - 0.067s
success Caching Webpack compilations - 0.001s
error Cannot read properties of undefined (reading 'id')

�[0m
�[0m �[0m�[97m�[41mTypeError�[0m�[37m�[41m:�[0m�[37m�[41m �[0m�[97m�[41mCannot read properties of undefined (reading 'id')�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mnode-model.js�[0m�[90m:�[0m�[93m779�[0m�[37m �[0m�[37mresolveRecursive�[0m
�[0m �[0m �[0m�[90m[ncuc]/[gatsby]/src/schema/node-model.js:779:35�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mnode-model.js�[0m�[90m:�[0m�[93m796�[0m�[37m �[0m�[37mresolveRecursive�[0m
�[0m �[0m �[0m�[90m[ncuc]/[gatsby]/src/schema/node-model.js:796:28�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mtask_queues�[0m�[90m:�[0m�[93m95�[0m�[37m �[0m�[37mprocessTicksAndRejections�[0m
�[0m �[0m �[0m�[90mnode:internal/process/task_queues:95:5�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mnode-model.js�[0m�[90m:�[0m�[93m796�[0m�[37m �[0m�[37mresolveRecursive�[0m
�[0m �[0m �[0m�[90m[ncuc]/[gatsby]/src/schema/node-model.js:796:22�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mnode-model.js�[0m�[90m:�[0m�[93m483�[0m�[37m �[0m�[37mLocalNodeModel._doResolvePrepareNodesQueue�[0m
�[0m �[0m �[0m�[90m[ncuc]/[gatsby]/src/schema/node-model.js:483:32�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mnode-model.js�[0m�[90m:�[0m�[93m443�[0m�[37m �[0m
�[0m �[0m �[0m�[90m[ncuc]/[gatsby]/src/schema/node-model.js:443:11�[0m
�[0m �[0m
�[0m
error An error occurred during parallel query running.
Go here for troubleshooting tips: https://gatsby.dev/pqr-feedback

�[0m
�[0m �[0m�[97m�[41mError�[0m�[37m�[41m:�[0m�[37m�[41m �[0m�[97m�[41mWorker exited before finishing task�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mindex.js�[0m�[90m:�[0m�[93m117�[0m�[37m �[0m�[37mChildProcess.�[0m
�[0m �[0m �[0m�[90m[ncuc]/[gatsby-worker]/dist/index.js:117:45�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mnode:events�[0m�[90m:�[0m�[93m513�[0m�[37m �[0m�[37mChildProcess.emit�[0m
�[0m �[0m �[0m�[90mnode:events:513:28�[0m
�[0m �[0m
�[0m �[0m�[90m-�[0m �[0m�[93mchild_process�[0m�[90m:�[0m�[93m291�[0m�[37m �[0m�[37mProcess.ChildProcess._handle.onexit�[0m
�[0m �[0m �[0m�[90mnode:internal/child_process:291:12�[0m
�[0m �[0m
�[0m
not finished run queries in workers - 2.260s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant