Error in resolving document actions in Sanity.io project.
8 replies
Last updated: Aug 17, 2022
J
Hi š I'm trying to follow this tutorial, but are getting an error in when running in . Any help would be appreciated š
/node_modules/@sanity/desk-tool/lib/panes/document/DocumentPaneProvider.js
sanity start. The error is
Module not found: Error: Can't resolve 'part:@sanity/base/document-actions/resolver'
node_modules/@sanity/desk-tool/lib/panes/document
Aug 15, 2022, 2:07 PM
J
sanity.json:
{ "root": true, "project": { "name": "Prescription" }, "api": { "projectId": "******", "dataset": "production" }, "plugins": [ "@sanity/base", "@sanity/components", "@sanity/default-layout", "@sanity/default-login", "@sanity/desk-tool", "@sanity/dashboard", "order-documents", "scheduled-publishing" ], "env": { "development": { "plugins": ["@sanity/vision"] } }, "parts": [ { "name": "part:@sanity/base/schema", "path": "./schemas/schema" }, { "name": "part:@sanity/desk-tool/structure", "path": "src/deskStructure.js" }, { "implements": "part:@sanity/base/document-actions/resolver", "path": "resolveDocumentActions.js" } ] }
Aug 16, 2022, 7:17 AM
J
resolveDocumentActions.js:
// resolveDocumentActions.js // import the default document actions import defaultResolve from 'part:@sanity/base/document-actions' import {HelloWorldAction} from './HelloWorldAction' export default function resolveDocumentActions(props) { return [...defaultResolve(props), HelloWorldAction] }
Aug 16, 2022, 7:17 AM
J
user M
āļø šAug 16, 2022, 8:10 AM
J
Any thoughts
user M
? šAug 16, 2022, 1:33 PM
Hey
Can you try deleting node_modules and reinstalling?
user T
! Patience is key around here. If I'm not answering, it's likely that it's the middle of the night for me, since I'm in PST. I promise I'm never purposely ignoring you!Can you try deleting node_modules and reinstalling?
Aug 16, 2022, 3:44 PM
J
okay, sorry š I have tried deleting node modules and reinstalling it with
sanity install, also I tried to reinstall the relevant packages again
Aug 17, 2022, 7:13 AM
J
Figured it out! I had chosen a wrong path in sanity.json for the resolver file
Aug 17, 2022, 8:28 AM
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.