我正在尝试将ssh2-sftp-client
的{{1}}软件包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";