Ahmar Suhail
10/30/2020, 11:20 AMCORS
on my nexus server:
import { settings, use } from "nexus";
settings.change({
server: {
cors: {
origin: "*",
},
},
});
But when I try to make a request from the FE I get:
{
"event": "CORS does not work for serverless handlers. Settings will be ignored.",
"level": 4,
"path": [
"nexus",
"server"
]
}
Anyone know how I could fix this?Ryan
10/30/2020, 11:22 AMAhmar Suhail
10/30/2020, 1:04 PMAhmar Suhail
10/30/2020, 1:04 PMRyan
10/30/2020, 1:07 PMRyan
10/30/2020, 1:07 PMAhmar Suhail
10/30/2020, 1:15 PMRyan
10/30/2020, 1:33 PMAhmar Suhail
10/30/2020, 1:34 PMAhmar Suhail
10/30/2020, 1:35 PMAhmar Suhail
11/02/2020, 4:42 PM@nexus/schema
and having been following this example to get it to deploy on vercel. Running the build locally works fine but on vercel it gives the following error stack:Ahmar Suhail
11/02/2020, 4:43 PM21:56:36.441 Error: Cannot find module 'nexus/components/schema'
21:56:36.441 Require stack:
21:56:36.441 - /vercel/workpath0/src/graphql/event_request/query.ts
21:56:36.441 - /vercel/workpath0/src/graphql/event_request/index.ts
21:56:36.441 - /vercel/workpath0/src/schema.ts
21:56:36.441 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
21:56:36.441 at Function.Module._load (internal/modules/cjs/loader.js:841:27)
21:56:36.442 at Module.require (internal/modules/cjs/loader.js:1025:19)
21:56:36.442 at require (internal/modules/cjs/helpers.js:72:18)
21:56:36.442 at Object.<anonymous> (/vercel/workpath0/src/graphql/event_request/query.ts:3:1)
21:56:36.442 at Module._compile (internal/modules/cjs/loader.js:1137:30)
21:56:36.442 at Module.m._compile (/vercel/workpath0/node_modules/ts-node/src/index.ts:1043:23)
21:56:36.442 at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
21:56:36.442 at Object.require.extensions.<computed> [as .ts] (/vercel/workpath0/node_modules/ts-node/src/index.ts:1046:12)
21:56:36.442 at Module.load (internal/modules/cjs/loader.js:985:32)
21:56:36.490 error Command failed with exit code 1.
21:56:36.490 info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
21:56:36.500 Error: Command "yarn run vercel-build" exited with 1
Ahmar Suhail
11/02/2020, 4:43 PMRyan
11/03/2020, 12:24 PMnexus
being used somewhere?Ahmar Suhail
11/03/2020, 12:25 PM