Skip to content

Cannot find module error when installed using Bun. #252

@jordanmack

Description

@jordanmack

When OffCKB is installed using Bun, the following error is received:

Error: Cannot find module '../build/Release/cpufeatures.node'

This does not occur when installed with NPM.

The report is considered advisory since the instructions do not specifically mention Bun.

$bun i -g @offckb/cli
bun add v1.2.5 (013fdddc)

installed @offckb/cli@0.3.5 with binaries:
 - offckb

1 package installed [46.00ms]
$offckb
node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module '../build/Release/cpufeatures.node'
Require stack:
- /home/username/node_modules/cpu-features/lib/index.js
- /home/username/node_modules/@offckb/cli/dist/node/install.js
- /home/username/node_modules/@offckb/cli/dist/cmd/node.js
- /home/username/node_modules/@offckb/cli/dist/cli.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Function._load (node:internal/modules/cjs/loader:1055:27)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
    at Module.require (node:internal/modules/cjs/loader:1311:12)
    at require (node:internal/modules/helpers:136:16)
    at Object.<anonymous> (/home/username/node_modules/cpu-features/lib/index.js:3:17)
    at Module._compile (node:internal/modules/cjs/loader:1554:14)
    at Object..js (node:internal/modules/cjs/loader:1706:10)
    at Module.load (node:internal/modules/cjs/loader:1289:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/username/node_modules/cpu-features/lib/index.js',
    '/home/username/node_modules/@offckb/cli/dist/node/install.js',
    '/home/username/node_modules/@offckb/cli/dist/cmd/node.js',
    '/home/username/node_modules/@offckb/cli/dist/cli.js'
  ]
}

Node.js v22.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions