Closed mikemaccana closed 4 years ago
This may be a bug, may be a help issue. I tried to ask on gitter but there's 0 rooms and 0 people.
I'm having trouble loading fastify-raw-body 2.0.0 via TypeScript's ES6 conversion.
fastify-raw-body
2.0.0
import * as fastifyRawBody from "fastify-raw-body"; app.register(fastifyRawBody, { global: false, });
Would seem to be correct, but fastifyRawBody becomes {} and starting Fastify fails with:
fastifyRawBody
{}
/app/node_modules/avvio/boot.js:189 throw new Error('plugin must be a function or a promise') ^
logging fastifyRawBody should have some actual content.
I build a little CommonJS module and typescript parent to verify the above import syntax should work, and it does.
Closing this, I worked out the fix, will contribute to docs
🐛 Bug Report
This may be a bug, may be a help issue. I tried to ask on gitter but there's 0 rooms and 0 people.
I'm having trouble loading
fastify-raw-body
2.0.0
via TypeScript's ES6 conversion.To Reproduce
Would seem to be correct, but
fastifyRawBody
becomes{}
and starting Fastify fails with:Expected behavior
logging
fastifyRawBody
should have some actual content.You have already researched for similar issues?
I build a little CommonJS module and typescript parent to verify the above import syntax should work, and it does.