react-copy-to-clipboard icon indicating copy to clipboard operation
react-copy-to-clipboard copied to clipboard

Module not found: Error: Can't resolve 'react-copy-to-clipboard' in '/opt/build/repo/src'

Open brian-o-mars opened this issue 2 years ago • 3 comments

I implemented a copy button using react-copy-to-clipboard package, it works fine locally but on deploy to netlify, I'm getting this error. Can someone help pls. image

brian-o-mars avatar May 29 '22 18:05 brian-o-mars

Not added to the package.json

nkbt avatar May 29 '22 23:05 nkbt

imagen I have a similar problem, when I do build I get a message:

Could not find a declaration file for module 'react-copy-to-clipboard'.

And if I have it in my package.json.

josuecb95 avatar Dec 06 '22 15:12 josuecb95

"Declaration file" might be referring to typescript declarations? This is not a typescript package, it does not have type declarations. I haven't worked with Netlify so cannot help better

nkbt avatar Dec 06 '22 22:12 nkbt