I was trying to run backend project that uses graphql, this is working in my colleagues macOs but not in my windows. What problem does it seem to be? This is the error i got when trying to run the project.
<code> Error message:
serverless offline --host 0.0.0.0 --httpPort 3001 --useChildProcesses
Environment: win32, node 18.17.0, framework 3.38.0 (local), plugin 7.2.3, SDK 4.5.1
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
No matching handler found for 'srcfunctionsgraphql/handler' in 'D:WorkspaceTimeBook-API-first- release'. Check your service definition.
2 deprecations found: run 'serverless doctor' for more details
error Command failed with exit code 1.
</code>
<code> Error message:
serverless offline --host 0.0.0.0 --httpPort 3001 --useChildProcesses
Environment: win32, node 18.17.0, framework 3.38.0 (local), plugin 7.2.3, SDK 4.5.1
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
No matching handler found for 'srcfunctionsgraphql/handler' in 'D:WorkspaceTimeBook-API-first- release'. Check your service definition.
2 deprecations found: run 'serverless doctor' for more details
error Command failed with exit code 1.
</code>
Error message:
serverless offline --host 0.0.0.0 --httpPort 3001 --useChildProcesses
Environment: win32, node 18.17.0, framework 3.38.0 (local), plugin 7.2.3, SDK 4.5.1
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
No matching handler found for 'srcfunctionsgraphql/handler' in 'D:WorkspaceTimeBook-API-first- release'. Check your service definition.
2 deprecations found: run 'serverless doctor' for more details
error Command failed with exit code 1.
here is the handler.ts
<code> import { ApolloServer } from "apollo-server-lambda";
import { environment } from "@utils/index";
import cache from "./cache";
import context from "./context";
import dataSources from "./dataSources";
import { formatError } from "./error";
import plugins from "./plugins";
import schema from "./schema";
const server = new ApolloServer({
cache,
context,
dataSources,
formatError,
plugins,
schema,
debug: environment.isDev(),
introspection: environment.isDev(),
});
export const main = server.createHandler();
</code>
<code> import { ApolloServer } from "apollo-server-lambda";
import { environment } from "@utils/index";
import cache from "./cache";
import context from "./context";
import dataSources from "./dataSources";
import { formatError } from "./error";
import plugins from "./plugins";
import schema from "./schema";
const server = new ApolloServer({
cache,
context,
dataSources,
formatError,
plugins,
schema,
debug: environment.isDev(),
introspection: environment.isDev(),
});
export const main = server.createHandler();
</code>
import { ApolloServer } from "apollo-server-lambda";
import { environment } from "@utils/index";
import cache from "./cache";
import context from "./context";
import dataSources from "./dataSources";
import { formatError } from "./error";
import plugins from "./plugins";
import schema from "./schema";
const server = new ApolloServer({
cache,
context,
dataSources,
formatError,
plugins,
schema,
debug: environment.isDev(),
introspection: environment.isDev(),
});
export const main = server.createHandler();
Plase help whats wrong?
New contributor
Ritika Shrestha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.