Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: TS2749: 'Buffer' refers to a value but is being used as a type here #69

Open
myronu opened this issue May 12, 2020 · 1 comment

Comments

@myronu
Copy link

myronu commented May 12, 2020

I'm getting these errors when I try to build our project. We are using Angular 8 and Typescript 3.5.3. A search shows a similar error for StringDecoder, which was fixed in @types/node. I just upgraded our version of @types/node to the latest, 13.13.5, and still get the same error.

An unhandled exception occurred: node_modules/cmis/src/cmis.ts(228,50): error TS2749: 'Buffer' refers to a value, but is being used as a type here.
node_modules/cmis/src/cmis.ts(326,34): error TS2749: 'Buffer' refers to a value, but is being used as a type here.
node_modules/cmis/src/cmis.ts(793,32): error TS2749: 'Buffer' refers to a value, but is being used as a type here.
node_modules/cmis/src/cmis.ts(883,32): error TS2749: 'Buffer' refers to a value, but is being used as a type here.
node_modules/cmis/src/cmis.ts(1014,32): error TS2749: 'Buffer' refers to a value, but is being used as a type here.
node_modules/cmis/src/cmis.ts(1092,32): error TS2749: 'Buffer' refers to a value, but is being used as a type here.
node_modules/cmis/src/cmis.ts(1118,32): error TS2749: 'Buffer' refers to a value, but is being used as a type here.
@myronu
Copy link
Author

myronu commented May 12, 2020

I found the fix, I needed this in tsconfig.json

    "typeRoots": ["node_modules/@types"],
    "types": ["node"],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant