Giter Club home page Giter Club logo

discord-wrapped's Issues

Weird paths

  1. When I put the folder in another one named discord-wrapped, it doesn't work.
$ pwd
/home/ggorg/Downloads/discord-wrapped/discord-wrapped

$ node .
running
node:fs:585
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open '/home/ggorg/Downloads/discord-wrapped/package/account/user.json'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at getUserInfo (/home/ggorg/Downloads/discord-wrapped/discord-wrapped/src/extractor/extract.js:170:28)
    at module.exports (/home/ggorg/Downloads/discord-wrapped/discord-wrapped/src/animations/wrap.js:91:21)
    at /home/ggorg/Downloads/discord-wrapped/discord-wrapped/index.js:4:8
    at Object.<anonymous> (/home/ggorg/Downloads/discord-wrapped/discord-wrapped/index.js:5:3)
    at Module._compile (node:internal/modules/cjs/loader:1246:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1300:10)
    at Module.load (node:internal/modules/cjs/loader:1103:32)
    at Module._load (node:internal/modules/cjs/loader:942:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/ggorg/Downloads/discord-wrapped/package/account/user.json'
}

Node.js v19.6.0

Possible cause: https://github.com/Assassin-1234/discord-wrapped/blob/main/src/animations/wrap.js#L1-L2 + more (just fixing line 1 and 2 didn't fix it)
Possible fix: use node/path's resolve() and join() functions

  1. Bad practice: just appending paths together hoping that slashes (/) line up
    Possible fix: use node/path's join() function

  2. Bad practice: using forward slashes (/) on windows, which uses backslashes (\)
    Possible fix: use node/path's join() function

As much as I'd like to make a PR, the code is too complicated and messy so it would take me way too long.

linux

On linux you dont use .exes...

$ node .             
running
Currently processing the events, might take some time!
/home/ggorg/Downloads/discord-wrapped/src/animations/wrap.js:137
					reject(new Error(`Error extracting first frame: ${err.message}`));
					       ^

Error: Error extracting first frame: spawn /home/ggorg/Downloads/discord-wrapped/ffmpeg.exe ENOENT
    at FfmpegCommand.<anonymous> (/home/ggorg/Downloads/discord-wrapped/src/animations/wrap.js:137:13)
    at FfmpegCommand.emit (node:events:512:28)
    at emitEnd (/home/ggorg/Downloads/discord-wrapped/node_modules/fluent-ffmpeg/lib/processor.js:424:16)
    at /home/ggorg/Downloads/discord-wrapped/node_modules/fluent-ffmpeg/lib/processor.js:433:16
    at wrapper (/home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:271:20)
    at next (/home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:5795:24)
    at /home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:327:20
    at wrapper (/home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:271:20)
    at next (/home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:5795:24)
    at /home/ggorg/Downloads/discord-wrapped/node_modules/async/dist/async.js:327:20

Node.js v19.6.0,

Here you install ffmpeg/ffprobe from the system package manager, which most commonly places it in:

$ which ffmpeg
/usr/bin/ffmpeg

$ which ffprobe
/usr/bin/ffprobe

Quick workaround:

$ ln -s $(which ffmpeg) ffmpeg.exe
$ ln -s $(which ffprobe) ffprobe.exe

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.