aymene69 / stremio-jackett

Elevate your Stremio experience with seamless access to Jackett torrent links, effortlessly fetching torrents for your selected movies within the Stremio interface.
189 stars 35 forks source link

[Bug] #89

Closed rleroi closed 7 months ago

rleroi commented 7 months ago

Describe the bug When opening http://localhost:3000 in the browser, this happens:

npm run start

> stremio-addon-jackett@2.1.3 start
> node dist/addon/index.cjs

Server is running at http://localhost:3000
node:fs:600
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'undefined/frontend/configure/index.hbs'
    at Object.openSync (node:fs:600:3)
    at readFileSync (node:fs:468:35)
    at /Users/x/Stremio Addon Manager/community.aymene69.jackett/dist/addon/index.cjs:122:379
    at Zi.handle [as handle_request] (/Users/x/Stremio Addon Manager/community.aymene69.jackett/dist/addon/index.cjs:30:4143)
    at next (/Users/x/Stremio Addon Manager/community.aymene69.jackett/dist/addon/index.cjs:30:6337)
    at ea.dispatch (/Users/x/Stremio Addon Manager/community.aymene69.jackett/dist/addon/index.cjs:30:6136)
    at Zi.handle [as handle_request] (/Users/x/Stremio Addon Manager/community.aymene69.jackett/dist/addon/index.cjs:30:4143)
    at /Users/x/Stremio Addon Manager/community.aymene69.jackett/dist/addon/index.cjs:30:9068
    at Function.process_params (/Users/x/Stremio Addon Manager/community.aymene69.jackett/dist/addon/index.cjs:30:9654)
    at next (/Users/x/Stremio Addon Manager/community.aymene69.jackett/dist/addon/index.cjs:30:9019) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'undefined/frontend/configure/index.hbs'
}

Node.js v18.14.2

To Reproduce Steps to reproduce the behavior:

Just follow the Readme.md under "without docker"

Expected behavior No error, and show the /configure page

Screenshots If applicable, add screenshots to help explain your problem.

Your system info (please complete the following information): commit 8a4629c3360a35ae8fb179278e3a42f03d88d51d (tag: v2.1.3, origin/main)

aymene69 commented 7 months ago

Try to put in a directory where full directory path dont contains spaces

rleroi commented 7 months ago

Ah, I tried adding it to the new Electron app I'm building, Local Addon Manager. This will not work then.

rleroi commented 7 months ago

It seems some folder variable is undefined: 'undefined/frontend/configure/index.hbs'

aymene69 commented 7 months ago

They shouldn't. I have to agree afterall that I didn't do that much testing on Windows. Mainly on macOS/Linux environments

rleroi commented 7 months ago

I am using MacOS with M1

aymene69 commented 7 months ago

Try running it in your home directory

rleroi commented 7 months ago

Same problem.

Also when running npm run build, I get this warning, is this expected?

npm run build

> stremio-addon-jackett@2.1.3 build
> node esbuild.js

▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta]

    src/routes.js:195:20:
      195 │ const { dirname } = import.meta;
          ╵                     ~~~~~~~~~~~

  You need to set the output format to "esm" for "import.meta" to work correctly.

⚡ Done in 290ms
aymene69 commented 7 months ago

That isnt normal. Did you do some modification ? What node version do you have ?

rleroi commented 7 months ago

node --version v18.14.2

aymene69 commented 7 months ago

Is updating a possibility or you can't because of projects you work on?

rleroi commented 7 months ago

I see, node v21 solved it :)

aymene69 commented 7 months ago

Fantastic