Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after upgrading to 0.142.0 #1446

Closed
billyzduke opened this issue Aug 14, 2019 · 13 comments
Closed

Error after upgrading to 0.142.0 #1446

billyzduke opened this issue Aug 14, 2019 · 13 comments

Comments

@billyzduke
Copy link

Error in ./node_modules/@sanity/production-preview/lib/resolveProductionUrl.js (part:@sanity/transitional/production-preview/resolve-production-url)
Module not found: Error: Part "part:@sanity/production-preview/resolve-production-url" not implemented by any plugins
@ ./node_modules/@sanity/production-preview/lib/resolveProductionUrl.js (part:@sanity/transitional/production-preview/resolve-production-url 13:51-116)
@ ./node_modules/@sanity/desk-tool/lib/pane/Editor/Editor.js
@ ./node_modules/@sanity/desk-tool/lib/pane/Editor/index.js
@ ./node_modules/@sanity/desk-tool/lib/pane/EditorPane.js
@ ./node_modules/@sanity/desk-tool/lib/pane/Pane.js
@ ./node_modules/@sanity/desk-tool/lib/DeskToolPanes.js
@ ./node_modules/@sanity/desk-tool/lib/DeskTool.js
@ ./node_modules/@sanity/desk-tool/lib/index.js
@ ./node_modules/@sanity/vision/lib/VisionTool.js (all:part:@sanity/base/tool)
@ ./node_modules/@sanity/default-layout/lib/defaultLayoutRouter.js
@ ./node_modules/@sanity/default-layout/lib/components/DefaultLayoutContainer.js (part:@sanity/base/root)
@ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
@ ./node_modules/@sanity/server/lib/browser/entry-dev.js
@ multi ./node_modules/normalize.css/normalize.css ./node_modules/@sanity/server/lib/browser/entry-dev.js

To Reproduce

Steps to reproduce the behavior:

  1. upgrade from 0.141.6 to 0.142.0
  2. yarn start or sanity start in terminal

Expected behavior

sanity to start

Which versions of Sanity are you using?

@sanity/cli 0.142.0 (up to date)
@sanity/base 0.142.0 (up to date)
@sanity/components 0.142.0 (up to date)
@sanity/core 0.142.0 (up to date)
@sanity/default-layout 0.142.0 (up to date)
@sanity/default-login 0.142.0 (up to date)
@sanity/desk-tool 0.142.0 (up to date)
@sanity/google-maps-input 0.142.0 (up to date)
@sanity/production-preview 0.142.0 (up to date)
@sanity/vision 0.142.0 (up to date)

What operating system are you using?

Mojave

Which versions of Node.js / npm are you running?

6.10.0
v12.6.0

Additional context

@kmelve
Copy link
Member

kmelve commented Aug 15, 2019

Sorry for the trouble! Could you try deleting node_modules and running sanity install again?

@billyzduke
Copy link
Author

Deleted node_modules and did sanity install... Still the same error, whether I run sanity start or yarn start.

@billyzduke
Copy link
Author

Still getting same error after upgrading sanity to 0.142.1 and repeating above steps.

However, if I remove @sanity/production-preview from both package.json and sanity.json, delete node_modules, and re-install sanity, compile does not fail. Problem seems to be in that particular package.

@bjoerge
Copy link
Member

bjoerge commented Aug 19, 2019

Hi @billyzduke! Sounds like the studio is unable to pick up your implementation of the resolve-production-url part. What I don't understand is how that can have been caused by upgrading sanity.

What does your sanity.json look like with regards to step 3 in the production preview docs?

Could you double check that it points to an actual file?

@rexxars
Copy link
Member

rexxars commented Dec 6, 2019

Please reopen if still an issue.

@rexxars rexxars closed this as completed Dec 6, 2019
@ziahm
Copy link

ziahm commented Jun 9, 2020

Still getting the issue Module not found: Error: Can't resolve 'part:@sanity/production-preview/resolve-production-url' for sanity 1.149.10

@bigyanpaudel
Copy link

Try going to the main folder and running npm install --save @sanity/client again. This is what helped for me after hours of trying. Hope it helps!

@asheeshmathur
Copy link

I am getting same error
Error in ./node_modules/@sanity/structure/lib/parts/userStructure.js
Module not found: Error: Can't resolve 'part:@sanity/desk-tool/structure?' in '/Users/asheeshmathur/try/sanityshop/studio/node_modules/@sanity/structure/lib/parts'
@ ./node_modules/@sanity/structure/lib/parts/userStructure.js 9:9-53
@ ./node_modules/@sanity/structure/lib/userDefinedStructure.js
@ ./node_modules/@sanity/structure/lib/Document.js
@ ./node_modules/@sanity/structure/lib/index.js
@ ./node_modules/@sanity/base/structure-builder.js
@ ./node_modules/@sanity/default-layout/lib/util/getNewDocumentModalActions.js
@ ./node_modules/@sanity/default-layout/lib/DefaultLayout.js
@ ./node_modules/@sanity/default-layout/lib/Root.js (part:@sanity/base/root)
@ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
@ ./node_modules/@sanity/server/lib/browser/entry-dev.js
@ multi ./node_modules/@sanity/server/lib/browser/entry-dev.js

@jinxmcg
Copy link

jinxmcg commented Jan 12, 2022

@asheeshmathur
the module is 'part:@sanity/desk-tool/structure-builder?' not 'part:@sanity/desk-tool/structure?' i think the docs are wrong

@iankduffy
Copy link

@asheeshmathur the module is 'part:@sanity/desk-tool/structure-builder?' not 'part:@sanity/desk-tool/structure?' i think the docs are wrong

Having this issue aswell.

@shohjahon27
Copy link

@asheeshmathur the module is 'part:@sanity/desk-tool/structure-builder?' not 'part:@sanity/desk-tool/structure?' i think the docs are wrong

Having this issue aswell.

I stucked in this problem also

@yayen-lin
Copy link

I'm having this issue too. The above solution won't work. Is there a workaround by any chance so far?

@MetaphorX
Copy link

Hello, facing a similar issue too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests