无法显示 DrawingManager ("did you include prop libraries={[drawing']} in the URL? undefined")

Can't display DrawingManager ("did you include prop libraries={[drawing']} in the URL? undefined")

我正在尝试在我的地图上显示 DrawingManager,但我一直收到此错误

Did you include prop libraries={['drawing']} in the URL? undefined
invariant
C:/Users/summo/Documents/GitHub/pint-web-frontend/node_modules/invariant/browser.js:38
new DrawingManager
C:/Users/summo/Documents/GitHub/src/components/drawing/DrawingManager.tsx:72
  69 | constructor(props: DrawingManagerProps) {
  70 |   super(props)
  71 | 
> 72 |   invariant(
     | ^  73 |     !!google.maps.drawing,
  74 |     `Did you include prop libraries={['drawing']} in the URL? %s`,
  75 |     google.maps.drawing
View compiled
▶ 17 stack frames were collapsed.
then
C:/Users/summo/Documents/GitHub/src/useJsApiLoader.tsx:54
  51 |   return
  52 | } else {
  53 |   loader.load().then(function then() {
> 54 |     setLoaded(true)
     | ^  55 |   })
  56 |   .catch(function onrejected(error) {
  57 |     setLoadError(error)
View compiled
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.  Click the 'X' or hit ESC to dismiss this message.

这是我目前的代码:

import React from "react";
import {
    GoogleMap,
    LoadScript,
    Data,
    DrawingManager,
} from "@react-google-maps/api";

const containerStyle = {
    width: "100%",
    height: "600px",
};

function MyComponent(props) {
    return (
        <LoadScript
            googleMapsApiKey="API_KEY"}
        >
            <GoogleMap
                mapContainerStyle={containerStyle}
                center={{
                    lat: props.lat_centro,
                    lng: props.long_centro,
                }}
                zoom={16}
            >
                {/* Child components, such as markers, info windows, etc. */}
                <DrawingManager />
                <></>
            </GoogleMap>
        </LoadScript>
    );
}

export default React.memo(MyComponent);

尚未找到任何可以帮助解决此问题的文档,并在 3 小时内完成了一项任务。请有人救救我

忽略: “看起来您的 post 主要是代码;请添加更多详细信息。” “看起来您的 post 主要是代码;请添加更多详细信息。” “看起来您的 post 主要是代码;请添加更多详细信息。”

已通过猜测修复:必须将 libraries={["drawing"]} 添加到 LoadScript 道具。在发帖之前,我在其他地方都试过了。