Skip to content

node dist/api.js fails with "cannot find module bunyan" #81

@AumCoin

Description

@AumCoin

Debian 11, fresh out of the box. I follow directions and and when I get to node dist/api.js it fails with the error below. The same is true whether I run as root or a normal user. I have tried various directions on the internet to install bunyan with --save or globally, but this did not affect the result. I have been through your directions multiple times. Please tell me how to resolve this error.

root@xbrowsersync:/home/rick/api# node dist/api.js
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'bunyan'
Require stack:
- /home/rick/api/dist/server.js
- /home/rick/api/dist/api.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/rick/api/dist/server.js:26:34)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/rick/api/dist/server.js', '/home/rick/api/dist/api.js' ]
}

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