0

I am trying to use @ubilabs/google-maps-react-hooks to use data driven styling by google but I am getting the following error

Error

ERROR in ./node_modules/@ubilabs/google-maps-react-hooks/dist/index.modern.mjs 457:54-62
Can't import the named export 'useState' from non EcmaScript module (only default export is 
available)

Code

import React, { useState, useCallback, useRef, useEffect } from "react";
import {
  GoogleMapsProvider,
  GoogleMapsProviderProps,
  useAutocomplete,
  useGoogleMap,
} from "@ubilabs/google-maps-react-hooks";
Veera Silamban
  • 223
  • 1
  • 14
  • possibly a duplicate of this https://stackoverflow.com/questions/69343038/cant-import-the-named-export-xxxx-from-non-ecmascript-module-only-default-expo – Krismu Apr 25 '23 at 09:07
  • Thank you @Krismu. I am using reactjs as wordpress theme so I created app using npx-create-wptheme. Is there any other solution for above configuration. I have tried the method mentioned in that page but getting the same error – Veera Silamban Apr 25 '23 at 09:42

0 Answers0