UnhandledPromiseRejectionWarning: Error: Failed to load configuration file "sanity.config.js": #3472
Unanswered
paulpetritsch
asked this question in
Sanity Studio Support
Replies: 1 comment
-
Thanks for reporting @paulpetritsch! Can you try upgrading to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, when I try to deploy to graphql, I get this Error:
(node:24617) UnhandledPromiseRejectionWarning: Error: Failed to load configuration file "/Applications/XAMPP/xamppfiles/htdocs/eriosol/eniosol/eniosol-sanity/sanity.config.js": Unexpected token 'export' at getStudioConfig (/Applications/XAMPP/xamppfiles/htdocs/eriosol/eniosol/eniosol-sanity/node_modules/sanity/lib/cjs/cli/util/getStudioConfig.js:56:13) at resolveGraphQLApis (/Applications/XAMPP/xamppfiles/htdocs/eriosol/eniosol/eniosol-sanity/node_modules/sanity/lib/cjs/cli/actions/graphql/getGraphQLAPIs.js:104:65) at getGraphQLAPIsForked (/Applications/XAMPP/xamppfiles/htdocs/eriosol/eniosol/eniosol-sanity/node_modules/sanity/lib/cjs/cli/actions/graphql/getGraphQLAPIs.js:34:26) at Object.<anonymous> (/Applications/XAMPP/xamppfiles/htdocs/eriosol/eniosol/eniosol-sanity/node_modules/sanity/lib/cjs/cli/actions/graphql/getGraphQLAPIs.js:25:3) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at MessagePort.<anonymous> (internal/main/worker_thread.js:174:24) (Use
node --trace-warnings ...to show where the warning was created) (node:24617) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:24617) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
My sanity config looks like this
`import {createConfig} from 'sanity'
import {deskTool} from 'sanity/desk'
import {schemaTypes} from './schemas'
import {structure} from './structure'
export default createConfig({
name: 'default',
title: 'Eniosol Sanity Backend',
projectId: 'nikffqne',
dataset: 'production',
plugins: [deskTool({
structure
})],
schema: {
types: schemaTypes,
},
})
`
Do you know where this error comes from? Running Santity works.
Beta Was this translation helpful? Give feedback.
All reactions