【发布时间】:2019-05-10 10:22:25
【问题描述】:
我正在尝试从 https://github.com/hsuanxyz/ion2-calendar
但是当我尝试导入到我的 app.module.ts
我得到这个错误:
Uncaught Error: Cannot find module "@ionic/angular"
at webpackMissingModule (calendar.modal.js:13)
at Object.<anonymous> (calendar.modal.js:13)
at __webpack_require__ (bootstrap ff18038c92faa82fd673:54)
at Object.<anonymous> (index.js:7)
at __webpack_require__ (bootstrap ff18038c92faa82fd673:54)
at Object.355 (main.ts:5)
at __webpack_require__ (bootstrap ff18038c92faa82fd673:54)
at Object.332 (main.ts:1)
at __webpack_require__ (bootstrap ff18038c92faa82fd673:54)
at webpackJsonpCallback (bootstrap ff18038c92faa82fd673:25)
我的 app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { Http, Headers, RequestOptions, HttpModule } from '@angular/http';
import { CalendarModule } from 'ion2-calendar';
@NgModule({
declarations: [
MyApp,
HomePage
],
imports: [
BrowserModule,HttpModule,
IonicModule.forRoot(MyApp),
CalendarModule
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler}
]
})
export class AppModule {}
不知道怎么回事
【问题讨论】:
-
根据错误,请检查节点模块中是否存在@ionic-angular文件夹
-
谢谢你的回复,不,我不明白我该怎么办
-
删除节点模块并重新安装检查]
-
我得到同样的错误
-
向我们展示指向 ionic 和 ionic-angular 文件夹的节点模块结构