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

upgrade from 1.3.x to 1.4.x results in Cannot find module 'util/types' #46

Closed
steveliles opened this issue Feb 7, 2023 · 1 comment
Closed

Comments

@steveliles
Copy link

Upgrading from [email protected] to [email protected] with no other changes in my project I get:

Cannot find module 'util/types' from 'node_modules/roaring/index.js'

Everything works and my tests are green with 1.3.0, but cannot run tests or app with 1.4.x

node version: 14.19.3
npm version: 6.14.17

jest tests fail:

    Cannot find module 'util/types' from 'node_modules/roaring/index.js'

    Require stack:
      node_modules/roaring/index.js
      src/cypher/projection.js
      src/cypher/cypher.js
      src/cypher/index.js
      src/index.js
      src/index.test.js

      at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.<anonymous> (node_modules/roaring/index.js:26:54)

and the app itself will not run:

internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module 'util/types'
Require stack:
- /Users/steve/dev/DataLanguage/datagraphs/datagraphs-inmemory-graph-api/node_modules/roaring/index.js
- ...
- ...
- /Users/steve/dev/DataLanguage/datagraphs/datagraphs-inmemory-graph-api/dist/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/Users/steve/dev/DataLanguage/datagraphs/datagraphs-inmemory-graph-api/node_modules/roaring/index.js:26:54)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/steve/dev/DataLanguage/datagraphs/datagraphs-inmemory-graph-api/node_modules/roaring/index.js',
    ...
@SalvatorePreviti
Copy link
Owner

SalvatorePreviti commented Feb 12, 2023

Thank you for reporting, fixed in the new version roaring 1.4.3, just released.

It seems that util/types is available only from node 16+ and the eslint plugin that is supposed to verify I am not using nothing that do not work on node 8 didn't pick it up.

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

2 participants