Skip to content

pbts cannot find jsdoc #622

@ghost

Description

protobuf.js version: 6.4.3
OS: windows 10 x64

pbts fails to run, because it cannot find jsdoc module. Maybe affected by #618?

repro step

  1. greeter.proto is Greeter example.

  2. Run node_modules\.bin\pbjs --target static-module --wrap commonjs greeter.proto >greeter.js. This step installs CLI dependency and runs as expected.

  3. Run node_modules\.bin\pbts greeter.js > greeter.d.ts, fails to run.

error output

PS C:\Users\kang\Downloads\test> node_modules\.bin\pbts greeter.js > greeter.d.ts
module.js:471
    throw err;
    ^

Error: Cannot find module 'C:\Users\kang\Downloads\test\node_modules\protobufjs\node_modules\jsdoc\jsdoc.js'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
C:\Users\kang\Downloads\test\node_modules\protobufjs\cli\pbts.js:123
                    throw err;
                    ^

Error: code 1
    at Error (native)
    at ChildProcess.<anonymous> (C:\Users\kang\Downloads\test\node_modules\protobufjs\cli\pbts.js:119:27)
    at emitTwo (events.js:111:20)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

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