pbeshai / use-query-params

React Hook for managing state in URL query parameters with easy serialization.
https://pbeshai.github.io/use-query-params
ISC License
2.13k stars 95 forks source link

WARNING in ./node_modules/use-query-params/esm/memoizedQueryParser.js 4:28-44 #255

Closed EasyBreezy97 closed 1 year ago

EasyBreezy97 commented 1 year ago

I had my repository locally which was working correctly. I deleted it and tried to clone my repository from the remote. The source code was the same for both repositories. I get this error after I installed dependencies.

export 'parse' (imported as 'parseQueryString') was not found in 'query-string' (possible exports: default)

This image is from node_modules/use-query-params/esm/memoizedQueryParser.js

image

Also I get other warnings with the same kind of error. They are related to query-string library. Basically, imports from this library are not working.

I am using "use-query-params": "^1.1.6". I tried to install dependencies with node v16 and v18 but none of them worked. What seems to be the issue?

EasyBreezy97 commented 1 year ago

This was fixed by installing query-string as a dependency (even though this package has it in package.json it was not working in my case for some reason)