kriszyp / lmdb-js

Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Other
482 stars 39 forks source link

lmdb.clearKeptObjects is not a function #156

Closed TylerBarnes closed 2 years ago

TylerBarnes commented 2 years ago

Since the new release 4 hrs ago I'm running into this error via Gatsby which uses this package:

08:32:10 AM:

error (0 , _lmdb.clearKeptObjects) is not a function
08:32:10 AM:

08:32:10 AM:

  TypeError: (0 , _lmdb.clearKeptObjects) is not a function
08:32:10 AM:
08:32:10 AM:

  - Generator.next
08:32:10 AM:

08:32:10 AM:

    [www]/[gatsby]/src/datastore/common/iterable.ts:32:9
08:32:10 AM:

  - iterable.ts:32 GatsbyIterable.value
08:32:10 AM:

08:32:10 AM:

  - iterable.ts:63 GatsbyIterable.forEach
08:32:10 AM:

08:32:10 AM:

    [www]/[gatsby]/src/datastore/common/iterable.ts:63:16
08:32:10 AM:

  - source-nodes.ts:22 discoverPluginsWithoutNodes
08:32:10 AM:

    [www]/[gatsby]/src/utils/source-nodes.ts:22:9
08:32:10 AM:

08:32:10 AM:

  - source-nodes.ts:42 warnForPluginsWithoutNodes
08:32:10 AM:

    [www]/[gatsby]/src/utils/source-nodes.ts:42:30
08:32:10 AM:

08:32:10 AM:

  - source-nodes.ts:125 _default
08:32:10 AM:

08:32:10 AM:

  - source-nodes.ts:25 sourceNodes
08:32:10 AM:

    [www]/[gatsby]/src/services/source-nodes.ts:25:3
08:32:10 AM:

08:32:10 AM:

    [www]/[gatsby]/src/utils/source-nodes.ts:125:5
08:32:10 AM:

  - index.ts:59 bootstrap
08:32:10 AM:

08:32:10 AM:

    [www]/[gatsby]/src/bootstrap/index.ts:59:3
08:32:10 AM:

  - build.ts:125 build
08:32:10 AM:

    [www]/[gatsby]/src/commands/build.ts:125:53
08:32:10 AM:

08:32:10 AM:

08:32:10 AM:

  - incremental-builds.js:1 setup
08:32:10 AM:

    [lib]/[@gatsby-cloud-pkg]/gatsby-inc-build-cli/webpack:/@gatsby-cloud-pkg/ga    tsby-inc-build-cli/lib/build.js:7:1
08:32:10 AM:

  - build.js:7 build
08:32:10 AM:

    [lib]/[@gatsby-cloud-pkg]/gatsby-inc-build-cli/webpack:/@gatsby-cloud-pkg/ga    tsby-inc-build-cli/lib/incremental-builds.js:1:1
kriszyp commented 2 years ago

Ok, I published a v2.3.1 that provides a no-op clearKeptObjects() to fix this issue (I believe this was the behavior before).

There is a little more work to be done to try provide a working clearKeptObjects() across different platforms, but this should get gatsby up and running at least. Let me know if you see any issues with this.

TylerBarnes commented 2 years ago

Thank you for the quick fix @kriszyp! I can confirm my builds are succeeding again 🙌

kriszyp commented 2 years ago

FYI, v2.3.2 should have working clearKeptObjects functions across all supported node versions/platforms now.