Skip to content

Module not found error while importing from _pb.d.ts file #304

@Atif-Bashir-1998

Description

@Atif-Bashir-1998

I have compiled a porto file fileA.porto using ts-protoc-gen and got two files fileA_pb.js and fileA_pb.d.ts
I am trying to import ts class in fileA_pb.ts following this section of documentation: https://www.npmjs.com/package/ts-protoc-gen#:~:text=In%20the%20above%20example%2C%20the%20generated%20folder%20will%20contain%20both%20.js%20and%20.d.ts%20files%20which%20you%20can%20reference%20in%20your%20TypeScript%20project%20to%20get%20full%20type%20completion%20and%20make%20use%20of%20ES6%2Dstyle%20import%20statements%2C%20eg%3A

But this gives an error stating that:

Module not found: Error: Can't resolve 'porto/logic_pd'

I am using Vue 3 with TS and "ts-protoc-gen": "^0.15.0"

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