Mark Faulkner
10/22/2021, 9:08 PMundefined ERROR Error: Root typing path "/var/task/src/context.ts" for the type "context" does not exist
So any attempts to invoke the API routes from my Next.js client results in the above being written into Cloudwatch. Has anyone seen this error before, and would you be able to point me in a direction of solving it ?
For reference the schema for Apollo is as follows:
export const schema = makeSchema({
types,
outputs: {
schema: path.join(process.cwd(), 'src', 'generated', 'schema.gen.graphql'),
typegen: path.join(process.cwd(), 'src', 'generated', 'nexus-types.gen.ts'),
},
plugins: [fieldAuthorizePlugin()],
contextType: {
module: path.join(process.cwd(), 'src', 'context.ts'),
export: 'ContextType',
alias: 'ctx',
},
});
thdxr
10/22/2021, 9:16 PMthdxr
10/22/2021, 9:17 PMMark Faulkner
10/22/2021, 9:28 PMthdxr
10/22/2021, 9:40 PMFrank
sst start
? It you stopped sst start
and then do a sst deploy
, the api routes works right?Yousef
10/22/2021, 10:36 PMsst start
i figured that workflow was unsupportedMark Faulkner
10/23/2021, 5:00 AMsst start
and asks for an sst deploy
to be runMark Faulkner
10/23/2021, 4:41 PMFrank
NextjsSite
since 0.45.2.Frank
undefined ERROR Error: Root typing path "/var/task/src/context.ts" for the type "context" does not exist
error when hitting the apis in your Next.js app’s pages/api
when running sst start
?Mark Faulkner
10/26/2021, 2:48 PMFrank