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

Named export 'Feedback' not found. The requested module 'sanity-plugin-utils' is a CommonJS module, which may not support all module.exports as named exports. #188

Open
marcinincreo opened this issue May 5, 2024 · 3 comments

Comments

@marcinincreo
Copy link

import { Feedback, useListeningQuery } from "sanity-plugin-utils";
^^^^^^^^
SyntaxError: Named export 'Feedback' not found. The requested module 'sanity-plugin-utils' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'sanity-plugin-utils';
const { Feedback, useListeningQuery } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
@sauld95
Copy link

sauld95 commented May 24, 2024

I'm having the same issue but this only happens when I install sanity manually (The sanity code is in Sveltekit) instead of using pnpm create sanity@latest

@nboliver-ventureweb
Copy link

nboliver-ventureweb commented May 24, 2024

Also encountering this issue, using the https://github.com/SimeonGriggs/sanity-remix-template template. Just tried with the https://github.com/sanity-io/sanity-template-remix-clean template and did not get the error.
@SimeonGriggs any ideas?

@sauld95
Copy link

sauld95 commented May 24, 2024

I noticed Simeon's template is set up similar to how I set up my Sveltekit with Sanity.
For the other template, Sanity studio has its own package.json separate from remix. It seems like it will only work if it's installed with npm create sanity@latest. This isn't the only plugin I'm having issues with. This is happening with quite a few plugins I'm dealing with

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

3 participants