苗条+;用于build electron应用程序的电容器-不工作

苗条+;用于build electron应用程序的电容器-不工作,electron,fs,svelte,capacitor,Electron,Fs,Svelte,Capacitor,使用Svelte+电容器构建electron应用程序时出错 node_modules/@types/fs-extra/index.d.ts:232:38 - error TS2694: Namespace '"fs"' has no exported member 'BaseEncodingOptions'. 232 (path: PathLike, options: fs.BaseEncodingOptions | BufferEncoding | und

使用Svelte+电容器构建electron应用程序时出错

node_modules/@types/fs-extra/index.d.ts:232:38 - error TS2694: Namespace '"fs"' has no exported member 'BaseEncodingOptions'.

232         (path: PathLike, options: fs.BaseEncodingOptions | BufferEncoding | undefined | null): Promise<string>;
                                         ~~~~~~~~~~~~~~~~~~~

node_modules/@types/fs-extra/index.d.ts:233:38 - error TS2694: Namespace '"fs"' has no exported member 'BufferEncodingOption'.

233         (path: PathLike, options: fs.BufferEncodingOption): Promise<Buffer>;
                                         ~~~~~~~~~~~~~~~~~~~~

node_modules/@types/fs-extra/index.d.ts:234:38 - error TS2694: Namespace '"fs"' has no exported member 'BaseEncodingOptions'.

234         (path: PathLike, options: fs.BaseEncodingOptions | string | undefined | null): Promise<string | Buffer>;
node_modules/@types/fs extra/index.d.ts:232:38-错误TS2694:命名空间“fs”没有导出的成员“BaseEncodingOptions”。
232(路径:类路径,选项:fs.BaseEncodingOptions | BufferEncoding | undefined | null):承诺;
~~~~~~~~~~~~~~~~~~~
节点_modules/@types/fs extra/index.d.ts:233:38-错误TS2694:命名空间“fs”没有导出的成员“BufferEncodingOption”。
233(路径:PathLike,选项:fs.BufferEncodingOption):Promise;
~~~~~~~~~~~~~~~~~~~~
节点_modules/@types/fs extra/index.d.ts:234:38-错误TS2694:命名空间“fs”没有导出的成员“BaseEncodingOptions”。
234(路径:类路径,选项:fs.BaseEncodingOptions | string | undefined | null):承诺;

您只需将cd刻录到electron文件夹,然后

run npm install --save @types/fs-extra@9.0.7
然后跑

electron npm run electron:start