0

我正在尝试使用ssh2-sftp-client包 5.3.1 版本,Angular 9.0.4但遇到了很多错误,例如;

ERROR in ./node_modules/ssh2-sftp-client/lib/http-agents.js
Module not found: Error: Can't resolve 'https' in 'C:\workspace\myProject\node_modules\ssh2-sftp-client\lib'

   ERROR in ./node_modules/ssh2-sftp-client/lib/agent.js
Module not found: Error: Can't resolve 'fs' in 'C:\workspace\myProject\node_modules\ssh2-sftp-client\lib'

我这样做npm i ssh2-sftp-client并像这样导入到课堂上;

import SFTPClient from "ssh2-sftp-client";
4

0 回答 0