【问题标题】:Run npm run start:dev produce ERROR "Cannot find module 'ssh2-streams'"运行 npm run start:dev 产生错误“找不到模块 'ssh2-streams'”
【发布时间】:2022-01-05 19:56:39
【问题描述】:

我正在 Linux Mint 20 操作系统中使用 docker Nodejs 应用程序,我可以成功运行 docker-compose。但是当尝试使用npm run start:dev 启动应用程序时,它会开始观察,然后显示以下错误:

node_modules/node-ssh/lib/typings/index.d.ts:4:41 - error TS2307: Cannot find module 'ssh2-streams' or its corresponding type declarations.
4 import { Prompt, TransferOptions } from 'ssh2-streams';
                                          
[1:30:24 PM] Found 1 error. Watching for file changes.

请帮忙!!

【问题讨论】:

    标签: docker npm ssh2


    【解决方案1】:

    对项目中缺少的类型包运行此命令

     npm i @types/ssh2-streams 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-13
      • 2019-04-05
      • 2023-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-28
      • 2021-07-15
      相关资源
      最近更新 更多