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

[error] - Module not found: Can't resolve '@spotlightjs/spotlight' #57

Open
shailedrathakur300 opened this issue Nov 15, 2024 · 7 comments

Comments

@shailedrathakur300
Copy link

package manager i used --pnpm
Screenshot from 2024-11-15 21-16-26

Follow all the instruction mention in the
https://github.com/BuilderIO/hydration-overlay

@samijaber
Copy link
Contributor

Are you attempting to use the spotlight integration? If so you need to install it separately.

Or are you seeing this failure while trying to use the hydration-overlay package as normal, without @spotlightjs/spotlight?

@shailedrathakur300
Copy link
Author

@samijaber my bad previously i dont know about the @spotlightjs/spotlight
i fix it
but after implemention all the step in the readme file why still hydration msg look like
Screenshot from 2024-11-15 21-52-33
it very frastrating to see this ugly error msg

@samijaber
Copy link
Contributor

this is the nextjs error. the plugin will not remove it. it will always be displayed by nextjs. the hydration plugin will show another error modal when this one is dismissed

@cjwiseman11
Copy link

I am trying out this tool and I'm getting this same error. I don't use spotlight and haven't specified any integrations - I can't see any documentation for this either 🤔

I've simply added around my and added the Webpack config.

Any ideas?

@cjwiseman11
Copy link

cjwiseman11 commented Dec 11, 2024

Looking through the source code and tests I can see that the integrations are set on the HydrationOverlay, so I tried explicitly setting no integrations to see if it was somehow defaulting to true

<HydrationOverlay integrations={{}}>

But still saw the issue... We are definitely not going into that code branch but the import is still occuring, so I wonder if this issue is happening: webpack/webpack#17986 or something similar where that import is being hoisted for some reason

@shailedrathakur300
Copy link
Author

@cjwiseman11 you can use provider.tsx and than wrap your children in layout.tsx
and make provider.tsx as a client
i found out the 2 main reason for this issue
1 - if you use nav or fotter in layout.tsx
2 - extension (try to open in private mode )

@OrlandoCano-Carewell
Copy link

I did a fresh install of the library

<HydrationOverlay> <RenderBuilderContent content={content} /> </HydrationOverlay>

   when I wrap my component I get  the following error.
   
   I looked in the package and it has spotlightjs as a optional peer dependency so I'm not sure why out of the box its making it required.         
Screenshot 2025-01-13 at 8 07 34 PM

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

4 participants