azzlack/sanity-plugin-tabs

Plugin appears to be incompatible with Sanity v2.1.x

Closed this issue · 5 comments

Upgrading Sanity to v2.1.x causes the desk to crash when changing tabs.

Hi!
I've been using this plugin with Sanity v2.1.x and didn't have any problem.
What error do you get in the console?

@nboliver I was getting an error as well:

Uncaught TypeError: Cannot read property 'sanity' of undefined

I remove my .lock file and node_modules folder. And did a fresh yarn install and it seemed to clear up the issue. Not sure exactly why this was happening though.

I am encountering the same error, @DevinEdwards and can confirm I got it working with your fix, although it took a few attempts... I had initially run sanity install, deleted the node_modules and package-lock.json, reran package installation with yarn but with the same result, deleted node_modules and yarn.lock and reran sanity install and presto!

@hessius @DevinEdwards I just experienced the same problem (and solution) but with a different plugin, wondering perhaps if there is something about yarn and sanity that can create some issues with dependencies.

vamcs commented

I've had this problem when migrating from npm to yarn. I guess it was due to some difference in package resolution, but one of things that solved it was when the Sanity CLI suggested installing a missing dependency to styled-components.