找不到模块' @ agm/core' [英] Cannot find module '@agm/core'

查看:98
本文介绍了找不到模块' @ agm/core'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的angular 4应用程序中使用Google地图.
我正在使用Angular 4和Nodejs 8.

I am trying to use Google maps in my angular 4 app.
I am using Angular 4 and Nodejs 8.

import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ApplicationRef } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';

import { AgmCoreModule } from '@agm/core';

@NgModule({
  imports: [
    BrowserModule,
    CommonModule,
    FormsModule,
    AgmCoreModule.forRoot({
      apiKey: 'GOOGLEAPIKEY'
    })
  ],
  providers: [],
  declarations: [ AppComponent ],
  bootstrap: [ AppComponent ]
})
export class AppModule {}

请帮助我??

推荐答案

npm install @ agm/core --save

npm install @agm/core --save

此命令解决了我的问题.非常感谢.

This command solved my problem.Thanks a lot.

这篇关于找不到模块' @ agm/core'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆