Closed tyler-brandt closed 2 weeks ago
I look for the same thing, did you found a way how to do this?
Im having the same issue, for reference Im using Sanity Studio V3 "sanity": "^3.8.3",
not sure if thats part of the problem.
EDIT
Looks like I just had my sanity.json
file set up wrong, I forgot to add the "api", I also moved my sanity.json
to the root of my project, and everything seems to work fine now.
{
"api": {
"projectId": "my-project-id",
"dataset": "my-data-set"
}
}
shouldn't the sanity.config.ts be found as used as well? According to the source code only the .JSON file is supported
Apologies for the delay on this. The plugin only supported v2 of Sanity which had a different configuration format. We have now updated the plugin to support the newer sanity.cli.js|ts config file.
Hello, I have a folder with some
.groq
files as well as asanity.json
file, with a directory structure like soWhen I open either
client_query.groq
ortest.groq
and attempt to execute a query, I get the following error:ENOENT: no such file or directory, open '/Users/{my-user-name}/.config/sanity/config.json'
I tried creating a symlink to the file at that location and still no luck.
After reviewing the source code for the extension I don't see any obvious reason this isn't working, as my test file and my sanity.json file are siblings. https://github.com/sanity-io/vscode-sanity/blob/4ece39a311251664630518599e799eb1ba99adea/src/config/findConfig.ts#L14
Has anyone else had this issue or see anything I'm doing wrong?
My sanity.json looks like the following
I'm on MacOS 12.6
VSCode details: Version: 1.76.2 (Universal) Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884 Date: 2023-03-14T17:54:09.061Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Darwin arm64 21.6.0 Sandboxed: Yes