Ionic 2 - 导入 @ionic-native/geolocation 导致构建失败

Ionic 2 - Importing @ionic-native/geolocation causes build to fail

我做了什么:
我正在使用 Visual Studio,所以我通过添加编辑了 package.json 文件:
- cordova-plugin-geolocation(在 cordovaPlugins 数组内)
- @ionic-native/geolocation(内部依赖对象)

然后我通过添加以下内容来编辑 app.module.ts 文件:

import { Geolocation } from '@ionic-native/geolocation';

此时,当我尝试 运行 浏览器仿真时,我会收到以下错误:

Failed to load resource: the server responded with a status of 404 (Not Found) : main.css
Failed to load resource: the server responded with a status of 404 (Not Found) : main.js
Failed to load resource: the server responded with a status of 404 (Not Found) : polyfills.js

此外,我尝试通过以下方式导入假包:

import { Geolocation } from '@ionic-native/dfsdfdsf';

而且我没有收到任何错误(当然,即使它什么也没做)。

我放了

"cordova-plugin-geolocation": "^2.4.3"

在我的 package.json 的依赖项中。

我在'cordovaPlugins'下已经有了,但是好像还不够
现在可以正常使用了。

请尝试运行升级

npm i --save @ionic-native/geolocation@5.0.0-beta.14