Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image doesn't get committed #14

Open
Letgamer opened this issue Apr 4, 2024 · 6 comments
Open

Image doesn't get committed #14

Letgamer opened this issue Apr 4, 2024 · 6 comments

Comments

@Letgamer
Copy link

Letgamer commented Apr 4, 2024

https://github.com/Letgamer/Letgamer
https://github.com/Letgamer/Letgamer/actions/runs/8556624967/job/23446939621

node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, open './assets/thm_propic.png'
Emitted 'error' event on WriteStream instance at:
    at WriteStream.onerror (node:internal/streams/readable:773:14)
    at WriteStream.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:[12](https://github.com/Letgamer/Letgamer/actions/runs/8556624967/job/23446939621#step:3:13)2:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: './assets/thm_propic.png'
}

Apparently no commit is made and then the image is of course not found. I don't get why no commit is made, maybe it has todo with wrong permissions

@p4p1
Copy link
Owner

p4p1 commented Apr 5, 2024

I remember having a bug like this did you properly create the assets folder? the nodejs script does not create a assets folder so this might be the issues if after creating the folder the problem is still here you can also try and create a empty thm_propic.png file and then it should find the file to edit but that step should not be needed it's only a problem with the folder not existing if my memory is correct.

@Letgamer
Copy link
Author

Letgamer commented Apr 6, 2024

I tried that before opening the issue and it didn't work, but now somehow it worked?😅
But it still doesn't commit the file:

(node:1727) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	assets/thm_propic.png

nothing added to commit but untracked files present (use "git add" to track)
nothing to commit

@Letgamer
Copy link
Author

Letgamer commented Apr 6, 2024

I also created the https://github.com/Letgamer/Letgamer/blob/main/assets/thm_propic.png and now I get:

(node:1716) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   assets/thm_propic.png

no changes added to commit (use "git add" and/or "git commit -a")
nothing to commit

It states that the file was modified but it still is the same

@Letgamer
Copy link
Author

Letgamer commented Apr 6, 2024

looks like the Problem in #13
but I have a custom profile picture in THM

@p4p1
Copy link
Owner

p4p1 commented Apr 7, 2024

you should delete that file but keep the folder to see because I think git is getting confused and isnt able to add the file to the commit I don't know what would be causing this.

EDIT: so I just checked and I think this problem is actually everywhere because on my repo I have the same error for some reason I think the nodejs version or the git library used might be the issue since I haven't updated them since. I would need to debug this further I'll see when I have time for this and I'll close this issue once it's fixed if someone want's to fix this for me commits are more than welcome :)

@Letgamer
Copy link
Author

Letgamer commented Apr 7, 2024

Thanks for helping me out, I really appreciate the workflow :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants