0

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

这是我得到的错误

在此处输入图像描述

谢谢你提前帮助我。

4

1 回答 1

0

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

{
  target: 'web',
  node: {
    fs: 'empty'
  },
  module: {
    loaders: [
      // make sure to install the 'json-loader' package: npm install json-loader
      {
        test: /\.json$/,
        loader: 'json'
      }
    ]
  }
}
于 2021-12-28T11:55:19.887 回答