Comments (6)
Yeah, it's not there.
$ tree /home/vadistic/dev/rewarp/node_modules/@nestjs/azure-func-http/dist
/home/vadistic/dev/rewarp/node_modules/@nestjs/azure-func-http/dist
├── azure-http.adapter.d.ts
├── azure-http.adapter.js
├── index.d.ts
└── index.js
from azure-func-http.
I found I could build this locally. When I do, it creates a subfolder router
inside dist, but it appears this is not uploaded to npm.
However, after linking this package to a project, and import via import { AzureHttpRouter } from '@nestjs/azure-func-http/dist/router'
I get an error thrown:
No overload matches this call.
Overload 1 of 2, '(module: any, options?: NestApplicationOptions): Promise<INestApplication>', gave the following error.
Type 'AzureHttpRouter' has no properties in common with type 'NestApplicationOptions'.
Overload 2 of 2, '(module: any, httpAdapter: AbstractHttpAdapter<any, any, any>, options?: NestApplicationOptions): Promise<INestApplication>', gave the following error.
Argument of type 'AzureHttpRouter' is not assignable to parameter of type 'AbstractHttpAdapter<any, any, any>'.
Property 'instance' is protected but type 'AbstractHttpAdapter<TServer, TRequest, TResponse>' is not a class derived from 'AbstractHttpAdapter<TServer, TRequest, TResponse>'.ts(2769)
from azure-func-http.
Fixed in 0.3.1
from azure-func-http.
With 0.3.1 :
Using const app = await NestFactory.create(AppModule, new AzureHttpRouter());
Log:
[25/11/2019 00:41:30] [Nest] 36920 - 2019-11-25 1:41:30 AM [NestFactory] Starting Nest application... [25/11/2019 00:41:30] [Nest] 36920 - 2019-11-25 1:41:30 AM [InstanceLoader] AppModule dependencies initialized +34ms [25/11/2019 00:41:30] [Nest] 36920 - 2019-11-25 1:41:30 AM [InstanceLoader] UsersModule dependencies initialized +2ms [25/11/2019 00:41:30] [Nest] 36920 - 2019-11-25 1:41:30 AM [InstanceLoader] GraphQLModule dependencies initialized +3ms [25/11/2019 00:41:30] (node:36920) UnhandledPromiseRejectionWarning: Error: No support for current HttpAdapter: AzureHttpRouter [25/11/2019 00:41:30] at GraphQLModule.registerGqlServer (c:\DEV\node_modules\@nestjs\graphql\dist\graphql.module.js:132:19) [25/11/2019 00:41:30] at GraphQLModule. (c:\DEV\node_modules\@nestjs\graphql\dist\graphql.module.js:116:18) [25/11/2019 00:41:30] at Generator.next () [25/11/2019 00:41:30] at fulfilled (c:\DEV\node_modules\@nestjs\graphql\dist\graphql.module.js:17:58)
Something wrong here or with graphql configuration?
from azure-func-http.
the graphql module only supports express and fastify as seen here
/* GraphQLModule.registerGqlServer */
if (platformName === 'express') {
this.registerExpress(apolloOptions);
} else if (platformName === 'fastify') {
this.registerFastify(apolloOptions);
} else {
throw new Error(`No support for current HttpAdapter: ${platformName}`);
}
}
I think the only solution is to use express instead of AzureHttpRouter
from azure-func-http.
Experiencing the same issue. func host start
does not seem to work while using AzureHttpRouter :/ Every route request fails with an unhandled exception because new AzureHttpRouter()
throws an exception:
UnhandledPromiseRejectionWarning: TypeError: trouter_1.default is not a constructor
from azure-func-http.
Related Issues (20)
- AzureHttpRouter constructor throws an exception HOT 3
- enable server side event support HOT 2
- Cronjobs support HOT 1
- Pls update documentation that this project is abandoned / deprecated HOT 1
- Documentation lacking around using context object to build custom logger module HOT 1
- Action Required: Fix Renovate Configuration
- TRouter constructor is undefined at runtime in AzureHttpRouter HOT 7
- Dependency Dashboard
- Response Headers are Not Matching the NEST Response when publish to Azure Function HOT 1
- package fails to install HOT 1
- exclude path not working in Azure function HOT 1
- CORS does not work with azure-func-http HOT 1
- class-validator is not working
- Make nest openapi impl better with azurefx HOT 1
- swagger-ui* not loading HOT 1
- Peer dependencies allows @azure/functions v1 or v3 but not v2 HOT 5
- MonoRepo Support HOT 1
- Azure Functions v4 support HOT 4
- Project dependencies
- Could not resolve dependency with @nestjs/common 9.0.0 HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-func-http.