sanity-plugin-order-documents
sanity-plugin-order-documents copied to clipboard
Unable to start sanity server after installing latest version of this package
I have been trying to use this package with my sanity repo and upon installing the latest version or this repo I'm getting the following error:
Error in ./node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js
Module parse failed: Unexpected token (306:11)
You may need an appropriate loader to handle this file type.
| }
|
| return { ...rect,
| x: rect.x - scroll.scrollLeft + offsets.x,
| y: rect.y - scroll.scrollTop + offsets.y
@ ./node_modules/sanity-plugin-order-documents/node_modules/react-select/dist/react-select.esm.js 23:0-26
@ ./node_modules/sanity-plugin-order-documents/build/components/organisms/TypeSection.js
@ ./node_modules/sanity-plugin-order-documents/build/components/OrderDocuments.js
Here is my project package list:
"@sanity/base": "^2.30.1",
"@sanity/core": "^2.30.2",
"@sanity/default-login": "^2.30.1",
"@sanity/desk-tool": "^2.30.1",
"@sanity/eslint-config-studio": "^2.0.0",
"@sanity/vision": "^2.30.1",
"eslint": "^8.6.0",
"prop-types": "^15.7",
"react": "^17.0",
"react-dom": "^17.0",
"sanity-plugin-order-documents": "^0.0.23",
"styled-components": "^5.2.0"
Same issue here
I tried lowering the version and it worked. But it had a lot of peer dependency conflicts. Just wondering what is breaking in latest version.
This wasted a lot of time for me today but I resolved for now by editing my package.json
from:
"sanity-plugin-order-documents": "^0.0.23",
to:
"sanity-plugin-order-documents": "0.0.19",
This wasted a lot of time for me today but I resolved for now by editing my package.json from:
"sanity-plugin-order-documents": "^0.0.23",
to:"sanity-plugin-order-documents": "0.0.19",
What version of sanity are you using? I managed to install version 0.0.19 sanity-plugin-order-documents. I can change the order of documents as in the gif but it does not save.
What version of sanity are you using? I managed to install version 0.0.19 sanity-plugin-order-documents. I can change the order of documents as in the gif but it does not save.
I am also facing the same problem. Did u find any solution?
What version of sanity are you using? I managed to install version 0.0.19 sanity-plugin-order-documents. I can change the order of documents as in the gif but it does not save.
I am also facing the same problem. Did u find any solution?
Change the version of the package to 0.0.19 from 0.0.23
For me, Sanity Studio makes me look amazing as a developer but is only <5% of my project so I just want it to "work". I tried again to get my project to build with current release of order-document (0.0.23) but I still get the same errors with floating-ui dependancy. Forcing this plugin to 0.0.19 still allows me to build and deploy my project as of Nov 22
@MithilHassan @sp4rq-dev
I'm using the 0.0.19 too and the order inside this plugin correctly changes both visually and in the "raw" data. The problem is just that visually the document order doesn't change into the original documents tab.
Moreover, if you go to your schema and change from this:
{
name: 'order',
title: 'Order',
type: 'number',
hidden: true,
},
to this
{
name: 'order',
title: 'Order',
type: 'number',
},
Inside your documents, you can see that the order is correctly written
Downgrading order-document did not work for long so I spent a bunch more time and I now I have a permanent fix for this that also works with 0.0.23.
If you don't already have a Webpack config file then create webpack.sanity.js
at the root of your project and set the content to:
module.exports = function (config, options) {
config.module.rules[0].exclude = {
test: /(node_modules|bower_components)/,
not: [
/@floating-ui\/dom/,
/@floating-ui\/core/,
]
};
return config;
};
Hi guys, in version 0.0.24 we have moved away from relying on the react-select
package (which has the error-causing floating-ui
as its dependency).
You should no longer experience parsing errors in 0.0.24+.