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

cannot find module imported from node_modules/sanity/lib/_chunk-es/_internalBrowser.mjs #6288

Closed
andrevenancio opened this issue Apr 9, 2024 · 2 comments

Comments

@andrevenancio
Copy link

If you find a security vulnerability, do NOT open an issue. Email security@sanity.io instead.

Describe the bug

I've done npx sanity init on an existing Nextjs Typescript project. I went through with the default options and when accessing the /studio route my project explodes.

 ⨯ Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/andrevenancio/testing/node_modules/refractor/lang/bash' imported from /Users/andrevenancio/testing/node_modules/sanity/lib/_chunks-es/_internalBrowser.mjs
Did you mean to import "refractor/lang/bash.js"?

I've consider that this might have been something wrong with my project so I've created a brand new nextjs project

npx create-next-app

Went through the default options, and then did npx sanity init.

The results are the same. When I try to access the /studio route. This fails on nextjs apps with the app router but also the pages router.

@linear linear bot closed this as completed Apr 9, 2024
@binoy14
Copy link
Contributor

binoy14 commented Apr 9, 2024

Hi, this is fixed in v3.37.1

Copy link
Contributor

github-actions bot commented Jul 9, 2024

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants