Javascript 无法从路径导入IonicModule

Javascript 无法从路径导入IonicModule,javascript,angular,typescript,ionic3,Javascript,Angular,Typescript,Ionic3,我对Angular和typescript相当陌生,但我有一个Angular 6项目,使用Ionic 3元素 我正试图将一个从from路径。/lib/ionic.bundle.js本地保存的库导入到我的项目中,但我收到了模板解析错误,这表明该模块没有为该路径导入 Error: Template parse errors: 'ion-card-header' is not a known element: 1. If 'ion-card-header' is an Angular component

我对Angular和typescript相当陌生,但我有一个Angular 6项目,使用Ionic 3元素

我正试图将一个从from路径
。/lib/ionic.bundle.js
本地保存的库导入到我的项目中,但我收到了模板解析错误,这表明该模块没有为该路径导入

Error: Template parse errors:
'ion-card-header' is not a known element:
1. If 'ion-card-header' is an Angular component, then verify that it is part of this module.
2. If 'ion-card-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
<ion-card>


import { IonicApp, IonicModule } from '../lib/ionic.bundle.js';
const routes: Routes = [
  {
    path: 'create',
    component: CreateComponent
  },
  {
    path: 'edit/:id',
    component: EditComponent
  },
  {
    path: 'index',
    component: IndexComponent
  }
];

@NgModule({
  declarations: [
    CreateComponent,
    IndexComponent,
    EditComponent,
  ],
  imports: [
    IonicModule.forRoot(routes)
  ],
  providers: [ ...]
})
export class AppModule { }
错误:模板分析错误:
“离子卡头”不是已知元素:
1.如果“离子卡头”是一个角度组件,则确认它是该模块的一部分。
2.如果“ion card header”是一个Web组件,则将“CUSTOM_ELEMENTS_SCHEMA”添加到此组件的“@NgModule.schemas”以抑制此消息。("
从“../lib/ionic.bundle.js”导入{IonicApp,IonicModule};
常数路由:路由=[
{
路径:“创建”,
组件:CreateComponent
},
{
路径:“编辑/:id”,
组件:EditComponent
},
{
路径:'索引',
组件:IndexComponent
}
];
@NGD模块({
声明:[
创建组件,
IndexComponent,
编辑组件,
],
进口:[
IonicModule.forRoot(路由)
],
提供者:[……]
})
导出类AppModule{}
我确信该文件存在于该路径,但由于某种原因没有被导入


是否有其他导入
IonicModule
的方法?

您应该尝试从
节点模块导入它

在项目目录的命令行中:

$ npm i ionic
安装后,从
开始尝试:

import { IonicModule } from 'ionic-angular'

你能提供你的文件夹结构吗?我没有在该文件夹中的离子模块。工作完美!