You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Property 'config' does not exist on type 'FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProviderDefault>'.
#176
I have searched existing issues to ensure the bug has not already been reported
Fastify version
^4.24.2"
Plugin version
^4.2.0
Node.js version
v18.12.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.0 (23A344)
Description
The code structure is created with fastify-cli using typescript template.
// file: authorization.tsimport{FastifyInstance}from"fastify"constauthorization=async(fastify:FastifyInstance,opts)=>{const{ httpErrors, config }=fastify// got error: Property 'config' does not exist on type 'FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProviderDefault>'.}
Steps to Reproduce
The code structure is created with fastify-cli using typescript template.
maybe the error is cause by @fastify/env not extending the fastify instance object like this
// file: authorization.tsimport{FastifyInstance}from"fastify"constauthorization=async(fastify:FastifyInstance,opts)=>{const{ httpErrors, config }=fastify// got error: Property 'config' does not exist on type 'FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProviderDefault>'.}
I already registerred the "@fastify/env"
// file: app.tsimportEnvfrom"@fastify/env"constapp: FastifyPluginAsync<AppOptions>=async(fastify,opts): Promise<void>=>{// Place here your custom code!// envvoidfastify.register(Env,{schema: S.object().prop("NODE_ENV",S.string().default("development")).valueOf(),})
is it bec
Expected Behavior
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Fastify version
^4.24.2"
Plugin version
^4.2.0
Node.js version
v18.12.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.0 (23A344)
Description
The code structure is created with fastify-cli using typescript template.
Steps to Reproduce
The code structure is created with fastify-cli using typescript template.
maybe the error is cause by
@fastify/env
not extending the fastify instance object like thisMy code
I already registerred the "@fastify/env"
is it bec
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: