hydration-overlay icon indicating copy to clipboard operation
hydration-overlay copied to clipboard

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

Open shailedrathakur300 opened this issue 1 year ago • 8 comments

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

shailedrathakur300 avatar Nov 15 '24 15:11 shailedrathakur300

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?

samijaber avatar Nov 15 '24 15:11 samijaber

@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

shailedrathakur300 avatar Nov 15 '24 16:11 shailedrathakur300

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

samijaber avatar Nov 15 '24 16:11 samijaber

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 :thinking:

I've simply added <HydrationOverlay /> around my <App /> and added the Webpack config.

Any ideas?

cjwiseman11 avatar Dec 11 '24 20:12 cjwiseman11

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: https://github.com/webpack/webpack/issues/17986 or something similar where that import is being hoisted for some reason

cjwiseman11 avatar Dec 11 '24 20:12 cjwiseman11

@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 )

shailedrathakur300 avatar Dec 14 '24 04:12 shailedrathakur300

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

OrlandoCano-Carewell avatar Jan 14 '25 01:01 OrlandoCano-Carewell

is their any fix for this issue so far

LeulAria avatar Apr 15 '25 23:04 LeulAria

To those interested in why this issue even came up - someone decided to integrate spotlight https://github.com/BuilderIO/hydration-overlay/issues/40

aditya-khapre avatar Dec 02 '25 09:12 aditya-khapre