Error using use-query-params when running build with Astro and Netlify
samaritanau opened this issue · comments
Hi, we are trying to use this in an astro site and when running npm run build we get the following error, any idea what might be causing that?
import { useQueryParam, StringParam, useQueryParams, withDefault, NumberParam, ArrayParam, BooleanParam } from 'use-query-params';
SyntaxError: Named export 'ArrayParam' not found. The requested module 'use-query-params' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'use-query-params';
const { useQueryParam, StringParam, useQueryParams, withDefault, NumberParam, ArrayParam, BooleanParam } = pkg;