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

macOS Node 23: "internal-data-bridge" threw an error while running the sourceNodes lifecycle: "length" is outside of buffer bounds #39223

Open
2 tasks done
domdomegg opened this issue Feb 2, 2025 · 0 comments
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@domdomegg
Copy link

domdomegg commented Feb 2, 2025

Preliminary Checks

Description

Building a Gatsby app on MacOS with Node 23 doesn't work, giving an error about internal-data-bridge (full logs below)

Reproduction Link

https://github.com/domdomegg/gatsby-39223-mre

(you can see failure logs in the GitHub actions run too)

Steps to Reproduce

  1. Use a Mac
  2. Install Homebrew, and node with brew install node (Node 23)
  3. Follow the TypeScript quick start, running npm init gatsby -- -y -ts gatsby-repro
  4. Attempt to build the app: cd gatsby-repro && npm run build

Expected Result

The site builds correctly

Actual Result

The build fails with an error

Logs

npm run build

> [email protected] build
> gatsby build


 ERROR  UNKNOWN

(node:68895) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative
instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

⠦ compile gatsby files

 ERROR  UNKNOWN

(node:68936) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative
instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

success compile gatsby files - 0.686s
success load gatsby config - 0.009s
success load plugins - 0.071s
success onPreInit - 0.000s
success initialize cache - 0.049s
success copy gatsby files - 0.038s
success Compiling Gatsby Functions - 0.148s
success onPreBootstrap - 0.156s
success createSchemaCustomization - 0.001s

 ERROR #11321  API.NODE.EXECUTION

"internal-data-bridge" threw an error while running the sourceNodes lifecycle:

"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
    [gatsby-repro]/[msgpackr]/dist/node.cjs:1093:18
  
  - node.cjs:1322 pack
    [gatsby-repro]/[msgpackr]/dist/node.cjs:1322:15
  
  - node.cjs:1647 Packr.writeObject
    [gatsby-repro]/[msgpackr]/dist/node.cjs:1647:6
  
  - node.cjs:1420 pack
    [gatsby-repro]/[msgpackr]/dist/node.cjs:1420:7
  
  - node.cjs:1186 Packr.pack.encode
    [gatsby-repro]/[msgpackr]/dist/node.cjs:1186:5
  
  - index.cjs:214 writeInstructions
    [gatsby-repro]/[lmdb]/dist/index.cjs:214:28
  
  - index.cjs:726 LMDBStore.put
    [gatsby-repro]/[lmdb]/dist/index.cjs:726:11
  
  - index.cjs:1084 LMDBStore.put
    [gatsby-repro]/[lmdb]/dist/index.cjs:1084:22
  
  - nodes.js:11 updateNodes
    [gatsby-repro]/[gatsby]/dist/datastore/lmdb/updates/nodes.js:11:24
  
  - lmdb-datastore.js:211 updateDataStore
    [gatsby-repro]/[gatsby]/dist/datastore/lmdb/lmdb-datastore.js:211:70
  
  - lmdb-datastore.js:254 
    [gatsby-repro]/[gatsby]/dist/datastore/lmdb/lmdb-datastore.js:254:7
  
  - mett.js:36 mettEmitEachStar
    [gatsby-repro]/[gatsby]/dist/utils/mett.js:36:11
  
  - Set.forEach
  
  - mett.js:35 Object.emit
    [gatsby-repro]/[gatsby]/dist/utils/mett.js:35:17
  
  - index.js:123 
    [gatsby-repro]/[gatsby]/dist/redux/index.js:123:11
  

not finished source and transform nodes - 0.055s

Environment

System:
    OS: macOS 15.2
    CPU: (12) arm64 Apple M2 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.6.1 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.9.2 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 132.0.6834.160
    Safari: 18.2
  npmPackages:
    gatsby: ^5.14.1 => 5.14.1

Config Flags

No response

@domdomegg domdomegg added the type: bug An issue or pull request relating to a bug in Gatsby label Feb 2, 2025
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

1 participant