sanity-io / sanity-plugin-media

Asset management plugin for Sanity
MIT License
152 stars 49 forks source link

Studio unable to compile #35

Closed heggemsnes closed 3 years ago

heggemsnes commented 3 years ago

Hey.

Love the plugin and we're using it on all of our projects.

We get several variation on this error error on our project with this plugin.

It shows up if either the plugin is added to the plugins array in sanity.json or imported/exported in assetSources.js

Warning in ./node_modules/sanity-plugin-media/node_modules/@sanity/ui/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js
123:27-40 "export '__spreadArray' was not found in 'tslib'
 @ ./node_modules/sanity-plugin-media/node_modules/@sanity/ui/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js
 @ ./node_modules/sanity-plugin-media/node_modules/@sanity/ui/node_modules/framer-motion/dist/es/index.js
 @ ./node_modules/sanity-plugin-media/node_modules/@sanity/ui/dist/es/components/toast/toastProvider.js
 @ ./node_modules/sanity-plugin-media/node_modules/@sanity/ui/dist/es/components/toast/index.js
 @ ./node_modules/sanity-plugin-media/node_modules/@sanity/ui/dist/es/components/index.js
 @ ./node_modules/sanity-plugin-media/node_modules/@sanity/ui/dist/es/index.js
 @ ./node_modules/sanity-plugin-media/dist/app.js
 @ ./node_modules/sanity-plugin-media/dist/index.js
 @ ./node_modules/@sanity/vision/lib/VisionTool.js (all:part:@sanity/base/tool)
 @ ./node_modules/@sanity/default-layout/lib/util/getOrderedTools.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

This happened after upgrading Sanity. Current version we're using:


  "@sanity/base": "^2.8.1",
  "@sanity/block-content-to-react": "^2.0.7",
  "@sanity/color-input": "^2.2.6",
  "@sanity/components": "^2.2.6",
  "@sanity/core": "^2.8.0",
  "@sanity/default-layout": "^2.8.1",
  "@sanity/default-login": "^2.8.0",
  "@sanity/desk-tool": "^2.8.1",
  "@sanity/production-preview": "^2.2.6",
  "@sanity/vision": "^2.8.0",
  "get-youtube-id": "^1.0.1",
  "prop-types": "^15.7",
  "react": "16.14.0",
  "react-dom": "16.14.0",
  "react-icons": "^3.11.0",
  "react-moveable": "^0.22.6",
  "react-youtube": "^7.13.1",
  "resize-observer": "^1.0.0",
  "sanity-plugin-asset-source-unsplash": "^0.1.3",
  "sanity-plugin-better-slug": "^1.0.0",
  "sanity-plugin-color-list": "^2.0.1",
  "sanity-plugin-media": "^1.2.2",
  "sanity-plugin-media-library": "^1.0.5"
robinpyon commented 3 years ago

Hey @heggemsnes, thanks for reporting – this seems to be a common issue when updating with sanity upgrade

Please try delete your node_modules folder, as well your package-lock.json / yarn-lock.json and re-run npm install + sanity start – let me know if that works for you!

heggemsnes commented 3 years ago

Whelp, that worked. Thank you so much.

man. 26. apr. 2021 kl. 11:25 skrev Robin Pyon @.***>:

Hey @heggemsnes https://github.com/heggemsnes, thanks for reporting – this seems to be a common issue when updating with sanity upgrade

Please try delete your node_modules folder, as well your package-lock.json / yarn-lock.json and re-run npm install + sanity start – let me know if that works for you!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robinpyon/sanity-plugin-media/issues/35#issuecomment-826669212, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYOCY4JSVNUYKKTCSHJCM3TKUWOZANCNFSM43RQW2GQ .

--

Kul hilsen,

Sigurd Heggemsnes +47 99 36 11 66 Kult Byrå www.kult.design Denne e-posten med eventuelle vedlegg kan inneholde opplysninger som er privilegert, konfidensiell og beskyttet mot utlevering. Hvis du ikke er den tiltenkte mottaker, må du slette meldingen, eventuelle vedlegg og varsle oss. Takk!