You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having this plugin installed will cause the following error when running the CLI command sanity graphql deploy:
/path to project/node_modules/sanity-plugin-tags/lib/schemas/tags.js:1
import t from"part:tags/components/input";const e={name:"tags",title:"Tags",type:"array",inputComponent:t,of:[{type:"tag"}]};export{e as default};
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1031:15)
at Module._compile (node:internal/modules/cjs/loader:1065:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
@mmgj This is because I bundle my plugin, but I only transpile it down to ES2015 (ES6). Graphql requires ES5. Thank you for linking the pull request and thread, that helped me find the source of the error!
I'll see what it takes to add another step to my build process to support ES5 transpiling.
Having this plugin installed will cause the following error when running the CLI command
sanity graphql deploy
:This seems to be the same issue mentioned in this thread on the Sanity Exchange, which ultimately appears to have been solved in this pull request to the original plugin repo.
The text was updated successfully, but these errors were encountered: