Javascript 未能编译爱奥尼亚项目

Javascript 未能编译爱奥尼亚项目,javascript,angular,typescript,ionic-framework,Javascript,Angular,Typescript,Ionic Framework,错误:此模块是使用“export=”声明的,只能使用 使用“allowSyntheticDefaultImports”时使用默认导入 旗帜 文件中的错误: // Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz> // Leon Yu <https://github.com/leonyu> // BendingBende

错误:此模块是使用“export=”声明的,只能使用 使用“allowSyntheticDefaultImports”时使用默认导入 旗帜 文件中的错误:

// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
//                 Leon Yu <https://github.com/leonyu>
//                 BendingBender <https://github.com/BendingBender>
//                 Maple Miao <https://github.com/mapleeit>

/// <reference types="node" />
import * as stream from 'stream';
import * as http from 'http';

export= FormData;

// Extracted because @types/node doesn't export interfaces.
interface ReadableOptions {
highWaterMark?: number;
encoding?: string;
objectMode?: boolean;
read?(this: stream.Readable, size: number): void;
destroy?(this: stream.Readable, error: Error | null, callback: (error: Error | null) => 
void): void;
autoDestroy?: boolean;
}

interface Options extends ReadableOptions {
writable?: boolean;
readable?: boolean;
dataSize?: number;
maxDataSize?: number;
pauseStreams?: boolean;
}

declare class FormData extends stream.Readable {
constructor(options?: Options);
append(key: string, value: any, options?: FormData.AppendOptions | string): void;
getHeaders(userHeaders?: FormData.Headers): FormData.Headers;
submit(
  params: string | FormData.SubmitOptions,
  callback?: (error: Error | null, response: http.IncomingMessage) => void
): http.ClientRequest;
getBuffer(): Buffer;
getBoundary(): string;
getLength(callback: (err: Error | null, length: number) => void): void;
getLengthSync(): number;
hasKnownLength(): boolean;
}

declare namespace FormData {
interface Headers {
  [key: string]: any;
}

interface AppendOptions {
  header?: string | Headers;
  knownLength?: number;
  filename?: string;
  filepath?: string;
  contentType?: string;
}

interface SubmitOptions extends http.RequestOptions {
  protocol?: 'https:' | 'http:';
}
1从“表单数据”导入表单数据; ~~~~~~~~

node_modules/@kintone/restapi client/node_modules/form data/index.d.ts:10:1

10导出=FormData; ~~~~~~~~~~~~~~~~~

以下是文件的代码:

// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
//                 Leon Yu <https://github.com/leonyu>
//                 BendingBender <https://github.com/BendingBender>
//                 Maple Miao <https://github.com/mapleeit>

/// <reference types="node" />
import * as stream from 'stream';
import * as http from 'http';

export= FormData;

// Extracted because @types/node doesn't export interfaces.
interface ReadableOptions {
highWaterMark?: number;
encoding?: string;
objectMode?: boolean;
read?(this: stream.Readable, size: number): void;
destroy?(this: stream.Readable, error: Error | null, callback: (error: Error | null) => 
void): void;
autoDestroy?: boolean;
}

interface Options extends ReadableOptions {
writable?: boolean;
readable?: boolean;
dataSize?: number;
maxDataSize?: number;
pauseStreams?: boolean;
}

declare class FormData extends stream.Readable {
constructor(options?: Options);
append(key: string, value: any, options?: FormData.AppendOptions | string): void;
getHeaders(userHeaders?: FormData.Headers): FormData.Headers;
submit(
  params: string | FormData.SubmitOptions,
  callback?: (error: Error | null, response: http.IncomingMessage) => void
): http.ClientRequest;
getBuffer(): Buffer;
getBoundary(): string;
getLength(callback: (err: Error | null, length: number) => void): void;
getLengthSync(): number;
hasKnownLength(): boolean;
}

declare namespace FormData {
interface Headers {
  [key: string]: any;
}

interface AppendOptions {
  header?: string | Headers;
  knownLength?: number;
  filename?: string;
  filepath?: string;
  contentType?: string;
}

interface SubmitOptions extends http.RequestOptions {
  protocol?: 'https:' | 'http:';
}
//定义人:Carlos Ballesteros Velasco
//余立群
//折弯机
//苗枫
/// 
从“流”导入*作为流;
将*作为http从“http”导入;
导出=FormData;
//已提取,因为@types/node不导出接口。
接口可读选项{
高水印?:数字;
编码?:字符串;
objectMode?:布尔型;
读取?(此:流。可读,大小:数字):无效;
销毁?(此:stream.Readable,错误:error | null,回调:(error:error | null)=>
无效):无效;
自动销毁?:布尔值;
}
接口选项扩展了ReadableOptions{
可写?:布尔值;
可读?:布尔;
数据大小?:数字;
maxDataSize?:数字;
pauseStreams?:布尔值;
}
声明类FormData扩展流。可读{
构造函数(选项?:选项);
追加(键:字符串,值:任意,选项?:FormData.AppendOptions |字符串):无效;
getHeaders(userHeaders?:FormData.Headers):FormData.Headers;
提交(
参数:字符串| FormData.SubmitOptions,
回调?:(错误:error | null,响应:http.IncomingMessage)=>void
):http.ClientRequest;
getBuffer():缓冲区;
getBoundary():字符串;
getLength(回调:(err:Error | null,length:number)=>void):void;
getLengthSync():编号;
hasnownlength():布尔值;
}
声明命名空间FormData{
接口头{
[键:字符串]:任意;
}
接口附加选项{
标题?:字符串|标题;
知识长度?:数字;
文件名?:字符串;
filepath?:字符串;
contentType?:字符串;
}
接口提交扩展了http.RequestOptions{
协议?:“https:”|“http:”;
}

}

请尝试将
allowSyntheticDefaultImports:true
添加到
tsconfig
中,看看这是否解决了问题

以下是类似查询的链接:

此外,以下是一些编译器选项:

希望这能有所帮助