【问题标题】:Cannot install webtorrent in angular无法以角度安装 webtorrent
【发布时间】:2022-01-27 01:48:03
【问题描述】:

无法安装npm install webtorrent 也尝试了旧版本和混合。

这是我遇到的错误

感谢您提前帮助我。

【问题讨论】:

    标签: node.js angular typescript ionic-framework webtorrent


    【解决方案1】:

    你应该看看 https://github.com/feross/webtorrent 的 webpack 部分。它说明您需要添加几行配置才能使其正常工作。

    {
      target: 'web',
      node: {
        fs: 'empty'
      },
      module: {
        loaders: [
          // make sure to install the 'json-loader' package: npm install json-loader
          {
            test: /\.json$/,
            loader: 'json'
          }
        ]
      }
    }
    

    【讨论】:

    • 我很抱歉。如果你不介意你能告诉我怎么做吗?
    猜你喜欢
    • 1970-01-01
    • 2021-03-20
    • 1970-01-01
    • 2018-07-26
    • 2021-06-23
    • 2020-10-02
    • 1970-01-01
    • 2020-04-01
    • 2017-03-15
    相关资源
    最近更新 更多