Deno compile with @types/node (Buffer) issue
Hi,
I am trying to get Deno to compile my node.js project and I am hitting the wall with typechecking (I know about --no-check, I just want to resolve this)
Error:
TS2580 [ERROR]: Cannot find name 'Buffer'.
return { out: Buffer.from(out).toString('hex'), result };
After some googling, I found there should be workaround https://docs.deno.com/runtime/fundamentals/node/#including-node-types
But unfortunalty the documentation mention is extremly vague.
Including /// <reference types="npm:@types/node" /> in top of my files does nothing, including it on top index.d.ts / buffer.d.ts in @types/node does nothing.
Did anyone had similiar issue / have knowledge how to resolve this?
I am trying to get Deno to compile my node.js project and I am hitting the wall with typechecking (I know about --no-check, I just want to resolve this)
Error:
TS2580 [ERROR]: Cannot find name 'Buffer'.
return { out: Buffer.from(out).toString('hex'), result };
After some googling, I found there should be workaround https://docs.deno.com/runtime/fundamentals/node/#including-node-types
But unfortunalty the documentation mention is extremly vague.
Including /// <reference types="npm:@types/node" /> in top of my files does nothing, including it on top index.d.ts / buffer.d.ts in @types/node does nothing.
Did anyone had similiar issue / have knowledge how to resolve this?
Deno
Guide to using Node.js modules and npm packages in Deno. Learn about compatibility features, importing npm packages, and differences between Node.js and Deno environments.

