Skip to content

throws an error when running from the command line on osx #121

Description

@EXC-BAD-ACCESS

both npx ulid and ulid (when installed globally) result in this error message:

file:///Users/adamtaylor/.nvm/versions/node/v18.19.1/lib/node_modules/ulid/dist/cli.js:87
    throw new ULIDError(ULIDErrorCode.PRNGDetectFailure, "Failed to find a reliable PRNG");
          ^

ULIDError: Failed to find a reliable PRNG (PRNG_DETECT)
    at detectPRNG (file:///Users/adamtaylor/.nvm/versions/node/v18.19.1/lib/node_modules/ulid/dist/cli.js:87:11)
    at monotonicFactory (file:///Users/adamtaylor/.nvm/versions/node/v18.19.1/lib/node_modules/ulid/dist/cli.js:151:25)
    at file:///Users/adamtaylor/.nvm/versions/node/v18.19.1/lib/node_modules/ulid/dist/cli.js:192:17
    at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:106:12) {
  code: 'PRNG_DETECT'
}

Node.js v18.19.1

i'm on an M2 mac, and ulid works just fine when running in a node script instead of using the command line. i do have nvm installed, not sure if that's a factor somehow...

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