runnerpaul
runnerpaul

Reputation: 7186

Getting Typescript error when I run an npm script

When I run tsc && npm run browserify && npm run minify I get this error:

lib/helper.ts:71:38 - error TS4078: Parameter 'inputData' of exported function has or is using private name 'Buffer'.

71   inputData: NodeJS.ReadableStream | Buffer | string

From what I can see, I should be exporting Buffer in some way but I'm not sure what that means or how to do it.

Upvotes: 0

Views: 180

Answers (1)

You need nodejs typings. Simply run npm install @types/node.

EDIT: If that's not the problem, then you should go to your lib/helper.ts and export the private Buffer, as inputData is exported and using Buffer, but Buffer is not exported.

Info extracted from here.

Upvotes: 1

Related Questions