Mega-Mewthree / BetterDiscordPlugins

Plugins and Libraries for BetterDiscord
MIT License
140 stars 514 forks source link

Could not be compiled #201

Open JustinsKittens opened 8 months ago

JustinsKittens commented 8 months ago

image

Error: ENOENT: no such file or directory, lstat 'C:\Users\Justin\AppData\Local\Discord\app-1.0.9030\zlib'
    at Object.realpathSync (betterdiscord/renderer.js:5:336446)
    at p.getFilePath (betterdiscord/renderer.js:5:338145)
    at p._load (betterdiscord/renderer.js:5:338240)
    at betterdiscord/renderer.js:5:341345
    at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:104:18)
    at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:2014:6)
    at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:2273:5)
    at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:3729:3)
    at A.requireAddon (betterdiscord/renderer.js:5:33832)
    at A.loadAddon (betterdiscord/renderer.js:5:6386)
    at A.loadAddon (betterdiscord/renderer.js:5:31500)
    at AsyncFunction.<anonymous> (betterdiscord/renderer.js:5:4366)
Jerome4-arc commented 3 months ago

I got the same error, Error: ENOENT: no such file or directory, lstat '/zlib' at Object.realpathSync (betterdiscord/renderer.js:5:370182) at p.getFilePath (betterdiscord/renderer.js:5:371881) at p._load (betterdiscord/renderer.js:5:371976) at betterdiscord/renderer.js:5:375069 at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:104:18) at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:2014:6) at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:2273:5) at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:3729:3) at N.requireAddon (betterdiscord/renderer.js:5:28792) at N.loadAddon (betterdiscord/renderer.js:5:6412) at N.loadAddon (betterdiscord/renderer.js:5:26460) at betterdiscord/renderer.js:5:4392

Jerome4-arc commented 3 months ago

Looks like we are missing something called "zlib". This is what chatGPT said.

"The error message indicates that the program is trying to access a file or directory named "zlib" using the lstat function, but it cannot find it. The error code "ENOENT" specifically means "No such file or directory".

Here's a breakdown of the error message:

Error: ENOENT: This part of the message indicates that an error has occurred due to a file or directory not being found. no such file or directory, lstat '/zlib': This part specifies the file or directory that couldn't be found. In this case, it's trying to locate a file or directory named "zlib". The error trace provides information about where the error occurred within the code:

Object.realpathSync (betterdiscord/renderer.js:5:370182): The realpathSync function in the file renderer.js at line 5 and column 370182 caused the error. p.getFilePath (betterdiscord/renderer.js:5:371881): The getFilePath function in the file renderer.js at line 5 and column 371881 is also involved. p._load (betterdiscord/renderer.js:5:371976): The _load function in the file renderer.js at line 5 and column 371976 is involved. eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:104:18), eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:2014:6), etc.: The error also occurs within the AutoStartRichPresence.plugin.js file at various line numbers. To resolve this error, you'll need to investigate why the program is trying to access the "zlib" file or directory and ensure that it exists in the expected location. It could be an issue with incorrect file paths, missing dependencies, or misconfigured settings."

Jerome4-arc commented 3 months ago

"The "zlib" library is a standard compression library in Node.js, used for compressing and decompressing data. It's usually included as part of the Node.js standard library, so you don't need to download it separately.

If your application relies on zlib and you're encountering an error related to it not being found, it's possible that there's an issue with how your application is configured or with the file paths it's using.

To resolve the issue:

Make sure you have Node.js installed on your system. You can download it from the official Node.js website: https://nodejs.org/.

Ensure that your application's dependencies are properly installed. You can do this by navigating to your project directory in the terminal and running npm install to install all dependencies listed in your package.json file.

Check your application's code to ensure that you're requiring/importing the zlib library correctly. In Node.js, you typically import zlib like this:

javascript Copy code const zlib = require('zlib'); Verify that the file paths in your application's code are correct. If your application is trying to access a file or directory named "zlib" and it's not finding it, there may be a problem with the path.

If you're working within a specific framework or environment (such as BetterDiscord, as indicated by the error message you provided earlier), there may be additional considerations or steps needed to resolve the issue. Please provide more context if you need further assistance with a specific platform or environment.

ChatGPT can make mistakes. Check important info."