Code Monkey home page Code Monkey logo

Comments (3)

JimmyLaurent avatar JimmyLaurent commented on August 15, 2024

I don't plan to use ES6 modules since it's not supported in the stable version of nodejs.

But I don't think your you problem is here, it may be some troubles with the dynamic imports (here) and your transpilation step.

from torrent-search-api.

johann-taberlet avatar johann-taberlet commented on August 15, 2024

But I don't think your you problem is here, it may be some troubles with the dynamic imports (here) and your transpilation step.

@JimmyLaurent : Thank you, you pointed out one of my problems! I had to use global.require for this dynamic import because of webpack.

If someone else need explanations on how to use this golden module in an angular-electron env you also have to :

  • Get rid of the require(...)(...) in the index.js of the "iconv-lite" module, __webpack__require() doesn't like it. Just comment this test (line 144 at this time)
    var nodeVerArr = nodeVer.split('.').map(Number); if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { require('iconv-lite');
    and replace require('./extend-node')(iconv); by require('iconv-lite');

  • don't use the constant __dirname in index.js of this module because you'll get the absolute path of the electron renderer. I found this workaround:
    const path = require('path'); const { remote } = require('electron'); const appPath = remote.app.getAppPath(); module.exports = createApi(path.resolve(appPath, './node_modules/torrent-search-api/lib/providers'));

Again thanks a lot for this module and for your help.

Oh and Yggtorrent changed its domain for https://ww3.yggtorrent.gg

from torrent-search-api.

JimmyLaurent avatar JimmyLaurent commented on August 15, 2024

I'm glad I could help ;)
Thanks for the details

from torrent-search-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.