New Gatsby project build failing
02:19 24 Apr 2025

I created a new Gatsby project following the docs, and after the build ran

npm run develop

but got this error:


> test@1.0.0 develop
> gatsby develop

success compile gatsby files - 2.358s
success load gatsby config - 0.072s
success load plugins - 0.397s
success onPreInit - 0.004s
success initialize cache - 0.110s
success copy gatsby files - 0.257s
success Compiling Gatsby Functions - 0.381s
success onPreBootstrap - 0.421s

'WMIC' is not recognized as an internal or external command,
success createSchemaCustomization - 0.007s

 ERROR  UNKNOWN

"length" is outside of buffer bounds



  Error: RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds

  - buffer:1066 Buffer.utf8Write
    node:internal/buffer:1066:13

  - node.cjs:1093 Packr.encodeUtf8
    [test]/[msgpackr]/dist/node.cjs:1093:18

  - node.cjs:1322 pack
    [test]/[msgpackr]/dist/node.cjs:1322:15

  - node.cjs:1647 Packr.writeObject
    [test]/[msgpackr]/dist/node.cjs:1647:6

  - node.cjs:1420 pack
    [test]/[msgpackr]/dist/node.cjs:1420:7

  - node.cjs:1186 Packr.pack.encode
    [test]/[msgpackr]/dist/node.cjs:1186:5

  - index.cjs:214 writeInstructions
    [test]/[lmdb]/dist/index.cjs:214:28

  - index.cjs:726 LMDBStore.put
    [test]/[lmdb]/dist/index.cjs:726:11

  - index.cjs:1084 LMDBStore.put
    [test]/[lmdb]/dist/index.cjs:1084:22

  - nodes.js:11 updateNodes
    [test]/[gatsby]/dist/datastore/lmdb/updates/nodes.js:11:24

  - lmdb-datastore.js:211 updateDataStore
    [test]/[gatsby]/dist/datastore/lmdb/lmdb-datastore.js:211:70

  - lmdb-datastore.js:254
    [test]/[gatsby]/dist/datastore/lmdb/lmdb-datastore.js:254:7

  - mett.js:36 mettEmitEachStar
    [test]/[gatsby]/dist/utils/mett.js:36:11

  - Set.forEach

  - mett.js:35 Object.emit
    [test]/[gatsby]/dist/utils/mett.js:35:17

  - index.js:123
    [test]/[gatsby]/dist/redux/index.js:123:11


not finished source and transform nodes - 0.196s   

I'm confused as to why the project is failing to build. I haven't touched a thing since running: npm init gatsby

I am new to Gatsby and expected it to build seeing as it's a fresh project. Has anyone encountered this error before? I read up on another question mentioning Node errors? Does Gatsby rely on a certain version of NodeJS?

reactjs node.js gatsby