首页 > 解决方案 > 带有 npm 的 ExtJS 7 - 无法满足“google”的要求

问题描述

尝试将谷歌地图添加到使用“开放工具”(即 npm)方案的 ExtJS 应用程序。

$ ext-gen app -t moderndesktopminimal -m theme-material -n App
$ cd app
$ npm install --save @sencha/ext-google
$ vim app.json # add "google" to the "requires" array
$ npm start

我收到以下错误。

> webpack-dev-server --env.profile=desktop --env.browser=yes --env.verbose=no

i [ext]: ext-webpack-plugin v7.0.2, Ext JS v7.0.0.156 Commercial Edition, Sencha Cmd v7.0.0.40, webpack v4.39.3n/a
i [ext]: Starting development build for extjs
ℹ 「wds」: Project is running at http://0.0.0.0:1962/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from ./
ℹ 「wds」: 404s will fallback to /index.html
i [ext]: Processing Build Descriptor : desktop (development environment)
i [ext]: [ERR] Cannot satisfy requirements for "google"!
i [ext]: [ERR]    The following versions cannot be satisfied:
i [ext]: [ERR]       App: google (No matches!)
i [ext]: [ERR] Cannot resolve package requirements
******************************************
i [ext]: Cannot satisfy requirements for "google"!
******************************************

有什么我想念的想法吗?

标签: extjs7

解决方案


Grrr .... 我最终为此花费了支持信用,只是发现它在他们的文档中,但根本不清楚。

我需要将模块的路径添加到 workspace.json 文件中的 packages>dir 以使其工作。添加其他插件 Ext 组件(如图表或 d3)不需要此步骤,但对于 google 来说这是必需的。

令人沮丧。


推荐阅读