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

Sanity 2.6.0 cannot resolve './utils/patches' #2363

Closed
geball opened this issue Mar 5, 2021 · 4 comments
Closed

Sanity 2.6.0 cannot resolve './utils/patches' #2363

geball opened this issue Mar 5, 2021 · 4 comments

Comments

@geball
Copy link
Contributor

geball commented Mar 5, 2021

Describe the bug

Sanity 2.6.0 will not run in dev mode (sanity start) or build.

To Reproduce

  1. Run sanity start on v2.6.0.

Expected behavior

The Studio would compile.

Screenshots

Using dataset from environment config (test)
✔ Checking configuration files...
⠧ Compiling...webpack built c80eff6faf890f33426a in 16541ms
✔ Compiling...
Failed to compile.

Error in ./node_modules/@sanity/form-builder/lib/sanity/uploads/uploaders.js
Module not found: Error: Can't resolve '../../utils/patches' in '/Users/geoff/Projects/playground/sanity/node_modules/@sanity/form-builder/lib/sanity/uploads'
 @ ./node_modules/@sanity/form-builder/lib/sanity/uploads/uploaders.js 10:15-45

Which versions of Sanity are you using?

@sanity/cli             2.6.0 (up to date)
@sanity/base            2.6.0 (up to date)
@sanity/code-input      2.2.6 (up to date)
@sanity/components      2.2.6 (up to date)
@sanity/core            2.6.0 (up to date)
@sanity/default-layout  2.6.0 (up to date)
@sanity/default-login   2.2.6 (up to date)
@sanity/desk-tool       2.6.0 (up to date)
@sanity/vision          2.2.6 (up to date)

What operating system are you using?

macOS 11.1

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

7.5.3
v14.15.5

Additional context

Copying node_modules/@sanity/form-builder/lib/utils/patches.js from a previous version got it working again.

@geball
Copy link
Contributor Author

geball commented Mar 5, 2021

This error is not happening on projects that are newly created on 2.6.0. It only occurs after upgrading (I was able to confirm the error when upgrading to 2.6.0 from 2.5.0, 2.4.3, and 2.3.5).

@rexxars
Copy link
Member

rexxars commented Mar 5, 2021

Seems like I was able to fix this in v2.6.1 - this one is a bit weird, cause it seems like yarn is doing something weird on upgrade. This is a workaround more than a proper fix, will have to look into this more closely 🔍

@rexxars rexxars closed this as completed Mar 5, 2021
@mornir
Copy link

mornir commented Mar 6, 2021

I upgraded the Studio from v2.3.7 to v2.6.0 and encountered the same error. In my case, I just ran yarn upgrade and it fixed the problem.

@paweltar
Copy link

Yes, I also encountered exactly the same problem when upgrading to 2.6.0 few days ago - in my case, I deleted the package-lock.json and node_modules folder and tried upgrading again - then it worked. With version 2.6.1, I didn't have problems during the upgrade anymore.

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

4 participants