Open sarimabbas opened 3 years ago
Hi, I guess it was caused by a ssr option. What about this?
import dynamic from 'next/dynamic';
// import Pattern from "url-knife";
const Pattern = dynamic(() => import('url-knife'), { ssr: false });
I'm having this same issue and the above suggestion didn't work for me. I get:
Could not find a declaration file for module 'url-knife'. '.../node_modules/url-knife/src/entry.js' implicitly has an 'any' type.
Try npm i --save-dev @types/url-knife if it exists or add a new declaration (.d.ts) file containing `declare module 'url-knife';
Property 'TextArea' does not exist on type 'ComponentType<{}>'.
Property 'TextArea' does not exist on type 'ComponentClass<{}, any>'.
at getTopUrls (webpack-internal:///./utils/getUrls.tsx:65:40)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
79 | );
80 |
> 81 | let urls = Pattern.TextArea.extractAllFuzzyUrls(myText);
| ^
"I have upgraded the version in 'package.json'. I recommend using the latest version.
Thanks for making this lib! It works beautifully in
create-react-app
but not innext
. Would you have any suggestions for how to rectify this?Thank you so much!