Discussion about resolving an issue with installing and running a command on terminal

13 replies
Last updated: Jun 12, 2022
Sharing my message again in hope someone could help me out on this one, as I am out of ideas. Hope someone sees it and knows how to solve this issue.
Thank you in advance
AI Update

I can see you're looking for help, but your message doesn't include the actual problem you're facing. This appears to be a follow-up to a previous question, but without those details, I can't provide specific guidance.

To get the help you need, please share:

  1. The specific issue - What are you trying to do and what's not working?
  2. Error messages - Any console errors, build failures, or warnings
  3. Relevant code - Your schema, queries, or component code related to the issue
  4. Environment details - Sanity Studio version, framework (Next.js, Remix, etc.), Node version
  5. What you've tried - Solutions you've already attempted

Where to get Sanity help:

Quick troubleshooting tips:

Feel free to repost with your specific problem details, and the community (including myself) will be much better equipped to help you solve it!

Try this command on terminal:
sanity install @sanity/desk-tool

aljosa@aljosa-ubuntu:~/Documents/projects/project/frontend/sanity$ sanity install @sanity/desk-tool


✔️ Saved lockfile

✔️ Saved lockfilePlugin '@sanity/desk-tool' installed

aljosa@aljosa-ubuntu:~/Documents/projects/project/frontend/sanity$ sanity start

✔️ Checking configuration files...⠇ Compiling...webpack built 0703873e44584e6a35bf in 14990ms

✔️ Compiling...Failed to compile.

Error in ./node_modules/@sanity/desk-tool/lib/utils/loadStructure.js
Module not found: Error: Can't resolve 'part:@sanity/desk-tool/structure?'
Not working sadly.. Could you please share me look of your @sanity/desk-tool/ , just to compare with mine
What does your sanity.json look like? Here's mine -- just wondering if there's something slightly off about the declaration of it, where maybe it is returning the "wrong" error of saying it can't find it in the first place.
Thank you for your file. Sadly it's being similar. This is mine sanity.json

{
  "root": true,
  "project": {
    "name": "digitale-grundung"
  },
  "api": {
    "projectId": "xxxxxxxxx",
    "dataset": "production"
  },
  "plugins": [
    "@sanity/base",
    "@sanity/components",
    "@sanity/default-layout",
    "@sanity/default-login",
    "@sanity/dashboard",
    "@sanity/desk-tool"
  ],
  "env": {
    "development": {
      "plugins": [
        "@sanity/vision"
      ]
    }
  },
  "parts": [
    {
      "name": "part:@sanity/base/schema",
      "path": "./schemas/schema"
    },
    {
      "name": "part:@sanity/desk-tool/structure",
      "path": "./deskStructure.js"
    }
  ]
}

in node_modules do you have this
desk-tool/structure
file, could you please check that
I do have that, yes. Is it missing on your installation?
Can you send me a screenshot or zip of your desk-tool/ folder, just to compare it. I am wondering, maybe I am missing a file there
Actually I apologize, my eyes were not lining up the indentations right; I have a /structure folder but it's right off the @sanity root
My desk-tool folder is just /lib, /dist and /src -- but here's my desk-tool folder in its entirety for the sake of completeness so you can check against it
Thank you a lot, found that one file was missing 🙏🙏
Wow, yay ( sort of )... super curious why it skipped that one but at least the story has a happy ending.
Thank you so much once again, think I was missing one file in node_modules, for some reason (not sure how that happened)
I am so pleased that I was able to help.

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?