Skip to content

TypeError: require(...) is not a function #16

Description

@stalinkay

@mdsb100 Hi. I'm getting the following error when I run gitlab projects. I'm running node v9.11.1. I had it working before so it may be due to the node version. See command output below.

/usr/local/lib/node_modules/cli-gitlab/bin/worker.js:56
      gitlab = require("gitlab")({
                                ^

TypeError: require(...) is not a function
    at requireOrGetGitlab (/usr/local/lib/node_modules/cli-gitlab/bin/worker.js:56:33)
    at Command.<anonymous> (/usr/local/lib/node_modules/cli-gitlab/bin/worker.js:242:16)
    at Command.listener (/usr/local/lib/node_modules/cli-gitlab/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:180:13)
    at Command.parseArgs (/usr/local/lib/node_modules/cli-gitlab/node_modules/commander/index.js:651:12)
    at Command.parse (/usr/local/lib/node_modules/cli-gitlab/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/cli-gitlab/bin/command.js:19:9)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/cli-gitlab/bin/gitlab:2:1)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
    at startup (internal/bootstrap/node.js:201:19)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions