0
Imap Client를 Angular 4로 구현하려고합니다. 내 앱에서 Imap이 필요합니다.Angular 4 imap 클라이언트 빌딩, Semver 에러
나는 NPM과 IMAP를 구현하는 노드 모듈을 발견했습니다 Repo
을하지만 난 문제가 생겼어요. 나는
"scripts": [
...,
"../node_modules/imap/lib/Connection.js"
],
다음 각-cli.json에 다음 줄을 추가 내 MailboxModule에 가져
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MailboxComponent } from './mailbox.component';
import * as Imap from 'imap' ;
@NgModule({
imports: [
CommonModule,
Imap
],
providers : [ ],
declarations: [MailboxComponent]
})
export class MailboxModule { }
코드는 잘 컴파일하지만 난 내 웹 브라우저의 콘솔에서 다음과 같은 오류와 끝까지 :
를 여기Uncaught TypeError: Invalid Version:
at new SemVer (semver.js:293)
at compare (semver.js:566)
at Function.gte (semver.js:615)
at Object.<anonymous> (utf7.js:4)
at Object.../../../../utf7/utf7.js (utf7.js:119)
at __webpack_require__ (bootstrap 55f9ac3…:54)
at Object.<anonymous> (Connection.js:7)
at Object.../../../../imap/lib/Connection.js (Connection.js:2128)
at __webpack_require__ (bootstrap 55f9ac3…:54)
at Object.../../../../../src/app/mailbox/mailbox.module.ts (mailbox.component.ts:11)
가 (기본)
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-mailbox',
templateUrl: './mailbox.component.html',
styleUrls: ['./mailbox.component.css']
})
export class MailboxComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
,369이다 MailboxComponent