Skip to content

TypeScript error in index.d.ts with Long type #753

@microshine

Description

@microshine

protobuf.js version: 6.7.1

I'm using you library in my project, but I've got error after last protobufjs update

Log

node_modules/protobufjs/index.d.ts(1293,21): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(1301,22): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(1309,22): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(1335,23): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(1343,24): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(2112,36): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(2126,44): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(2274,33): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(2282,63): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(2827,27): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(2836,26): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(2844,27): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(2874,28): error TS2304: Cannot find name 'Long'.
node_modules/protobufjs/index.d.ts(2883,29): error TS2304: Cannot find name 'Long'.

the problem is that you have @types/long in devDependencies, but it must be in dependencies

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