Unlock seamless workflows and faster delivery with our latest releases – get the details

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
Jun 12, 2022, 3:35 PM
Try this command on terminal:
sanity install @sanity/desk-tool

Jun 12, 2022, 4:05 PM
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?'
Jun 12, 2022, 4:10 PM
Not working sadly.. Could you please share me look of your @sanity/desk-tool/ , just to compare with mine
Jun 12, 2022, 4:10 PM
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.
Jun 12, 2022, 4:32 PM
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"
    }
  ]
}

Jun 12, 2022, 4:35 PM
in node_modules do you have this
desk-tool/structure
file, could you please check that
Jun 12, 2022, 4:35 PM
I do have that, yes. Is it missing on your installation?
Jun 12, 2022, 4:48 PM
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
Jun 12, 2022, 4:50 PM
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
Jun 12, 2022, 4:57 PM
Thank you a lot, found that one file was missing 🙏🙏
Jun 12, 2022, 5:24 PM
Wow, yay ( sort of )... super curious why it skipped that one but at least the story has a happy ending.
Jun 12, 2022, 5:27 PM
Thank you so much once again, think I was missing one file in node_modules, for some reason (not sure how that happened)
Jun 12, 2022, 6:55 PM
I am so pleased that I was able to help.
Jun 12, 2022, 7:15 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?