webtorrent / create-torrent

Create .torrent files
https://webtorrent.io
MIT License
341 stars 94 forks source link

fix import error #219

Closed nanamicat closed 1 year ago

nanamicat commented 1 year ago

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update [x] Bug fix [ ] New feature [ ] Other, please explain:

I got this error when importing, and this PR fix it.

ERROR in ./src/ssh.ts 14:41-66
  Module not found: Error: Package path . is not exported from package ....../node_modules/create-torrent (see exports field in ....../node_modules/create-torrent/package.json)
  @ ./src/main.ts 11:14-30

  webpack 5.75.0 compiled with 1 error in 3031 ms
welcome[bot] commented 1 year ago

🙌 Thanks for opening this pull request! You're awesome.

ThaUnknown commented 1 year ago

I think this is caused because you're importing a module in a non-module enviorment, webtorrent/webtorrent also uses webpack to bundle and doesn't run into this issue

github-actions[bot] commented 1 year ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?