r/JavaScriptHelp • • Mar 13 '21

✔️ answered ✔️ Need help storing parent classes into array (possibly with recursion)

2 Upvotes

I'm trying to take html that looks like this:

    <div data-condition=" noise = 'purr' "> 
       <div class="include" data-include="cat"></div> 
    </div>
    
    <div data-condition=" noise = 'bark' "> 
       <div  data-condition=" tail = 'wag' ">
           <div class="include" data-include="dog"></div> 
       </div>
    </div>

and convert it to an object that looks like this

data = {   
    cat: { noise: 'purr' },
    dog: {  noise: 'bark',  tail: 'wag'  }
}

I have a file with over a hundred of these blocks, and need to log (into the object) what generates each data-include. hoping someone can help. I'm using jquery but vanilla Js works as well. thanks!


r/JavaScriptHelp • • Jan 23 '21

❔ Unanswered ❔ Bootstrap 4 modal, handling with JQuery.

2 Upvotes

My code works, but wondering how you all would optimize it? There are two functions, one to catch someone hitting and redirect that to the button click function, and the button click that actually submits the form.

When the form submits, I get a JSON response composed of status (which is either "success" or "failure"), and message, which is the actual error message.

I feel like what I have now is far too many lines of code, and wonder how someone who knows more about what they're doing would do this :)

Here's my pastebin, I'd love to learn a little from you all.

https://pastebin.com/rBKbzKdq


r/JavaScriptHelp • • Jan 05 '21

❔ Unanswered ❔ How to put correctly url in tag <a> using javascript? blade syntax (laravel)

2 Upvotes

This's my code but it's not working

rows = rows + "<a href='{{ url( 'Logigramme/"+value.id_activite+"') }}'>"+value.nom+"</a>";

can someone show me the correct syntax


r/JavaScriptHelp • • Jan 05 '21

❔ Unanswered ❔ I can’t seem to figure out why the fetch is responding with an Unhandled Promise Rejection: SyntaxError: The string did not match the expected pattern. It works on another member that I created perfectly.

2 Upvotes

Problem page: https://oamstudios.com/default-user/seeram79/

Working page: https://oamstudios.com/default-user/titus/

Script:

<script> // this is for the .json gathering and implementing if(window.location.pathname.indexOf("/default-user/") == 0) { var account_name = document.getElementsByClassName("um-name")[0].innerText; var urltotal = "https://oamstudios.com/attendance/" + account_name + ".json"; var urlres = encodeURI(urltotal); let myRequest = new Request(urlres); fetch(myRequest) .then(response => response.json()) .then(data => { console.log(data) document.querySelector("#Account-Input-6827").innerHTML = ` <p>Class Credits: ${data["Class Credits"]}</p><p>Excused Absences: ${data["Excused Absences"]} </p><p>Invoice Status: ${data["Invoice Status"]}</p><p id="highlight">Invoice Link: <a href="${data["Invoice Link"]}" style="color: green;" target="_blank">View Invoice</a></p><p>Invoice Number: 00${data["Invoice No."]}</p>` var alarm = 2; var invstat = data["Invoice Status"]; var InvNo = "\r\nInvoice No. " + "00" + data["Invoice No."] + " has not been paid.\r\n\r\n Please make payment."; if(invstat !== "Invoice Paid"){ alert( InvNo ); document.getElementById("highlight").innerHTML = ` Invoice Link: <a href="${data["Invoice Link"]}" style="color: red; background: #FEFFAD;" target="_blank"><strong>PAY INVOICE</strong</a> ` } }); } </script>


r/JavaScriptHelp • • Dec 28 '20

❔ Unanswered ❔ How do I smoothly transition between ID

2 Upvotes

I want to smoothly transition fun from using card to card_add

<!DOCTYPE html>

<html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title>

<style>
    #card{
        height: 100px;
        width: 100px;
        background-color: red;
    }
    #card_add{
        height: 500px;
        width: 100px;
        background-color: blue;
    }
</style>

</head> <body> <button onclick="fun">yes</button> <div id="card">

</div>

</body> </html>


r/JavaScriptHelp • • Dec 24 '20

❔ Unanswered ❔ Issue with Return/Resolve

2 Upvotes

I have a function that is preforming a series of checks, and if all checks are passed it prints it to the console and executes another function, if not - it returns 606 and the rest of the code displays an error.

The expected result is 606, as I am intentionally making it fail the checks. Instead, my console is completely empty and it does not return 606.

This is my code, any help in debugging or a fix would be greatly appreciated.

exports.userBirthday = async function(username, age1) {
  console.log("Age is being validated")
  return new Promise((resolve, reject) => async function() {
  if (age1 > 117) resolve(606);
  const hashedUsername = await main.hashUsername(username);
  const currentAge = await main.userAge(username)
  console.log(currentAge)
  db.get(`SELECT Points, Modified FROM users WHERE Username = '${hashedUsername}'`, async function(err, result) {
    console.log(currentAge)
		if (currentAge == 404) {
      main.update(username, age1, 0);
      return;
    } else if (age1 > (currentAge + 1) || age1 < currentAge) {
      resolve(606);
      return(606);
		} else
		if ((result.Modified = main.date())) {
      resolve(606);
      return(606);
    } else {
      console.log("No issues found")
    main.update(username, age1, result.Points);
    }
  });
});
}

I have 1 thing in my console from this function: "Age is being validated" and after that all output stops - not even a return or resolve.

How would I go about fixing this?


r/JavaScriptHelp • • Dec 15 '20

❔ Unanswered ❔ Trying to check .text content for a word amongst other words

2 Upvotes

So, i apologize for my lack of knowledge. I am cutting snippets and trying to piece together some code, but I have hit a speed bump from time to time so far.

var read = document.getElementById("trophy-picker-6827").textContent

if (read == "eagle") {
  alert(read)
  var eagle = true;

}

The above code has been working for a single word in the ID, but I need it to work by checking that element through multiple words to see if eagle exist in the ID.

The web page is at: https://www.oamstudios.com/default-user/titus/


r/JavaScriptHelp • • Nov 24 '20

✔️ answered ✔️ .toFixed is making my head hurt.

2 Upvotes

Can someone please explains this too me;.

(I am a javascript noob, I mostly code in php)

<html><body>

<button onclick="myFunction()">Try it</button><p id="demo"></p>

<script>function myFunction() {var x = 8.391;var y = x.toFixed(2);var z = y * 76;document.getElementById("demo").innerHTML = z;}</script></body></html>

8.391 rounded to 2 places should be 8.39.

8.39 * 76 = 637.64

The script however outputs 637.6400000000001 ?

I'm trying to fix an issue with an order pages "subtotal" updating and this happens rather than the total being to 2 decile places.


r/JavaScriptHelp • • Nov 05 '20

❔ Unanswered ❔ promises help

2 Upvotes

so still trying to learn javascript and im struggling when it comes to working with promises. like this code for example.

myFunction().then(value => {
    console.log(value); // ← need to move this
});

console.log(value); // ← to here

async function myFunction() {
    return 'this is my function';
}

so my i want to move the value of the thenable down outside the promise how would i do that? one way that i tried was like this.

let newVal;

myFunction().then(value => {
    newVal = value;
});

console.log(newVal);

async function myFunction() {
    return 'this is my function';
}

but the variable newVal still comes up undefined. how can i work around this to use that thenable outside the method?


r/JavaScriptHelp • • Oct 30 '20

❔ Unanswered ❔ [Help] OAuth 2.0 + MTLS from FaaS

2 Upvotes

Hi, is there a way to make an api request using MTLS and OAuth 2.0 from a FaaS? Something like a JavaScript library that could help me?


r/JavaScriptHelp • • Oct 28 '20

❔ Unanswered ❔ Implementing stopwatch function into JS game

2 Upvotes

Hi. I need help adding a stopwatch to a JS game. I want the stopwatch to start when the player starts a round and then pause when the round is over. And when the rounds over, I want the paused time to be displayed when the player has the option to either play the next round or retry the same round. Whenever the round starts the stopwatch time resets. The link to the game’s code is here->: Factoring Game . I have a stopwatch code if needed.


r/JavaScriptHelp • • Oct 25 '20

❔ Unanswered ❔ This is probably easier than it seems to me.

2 Upvotes

I want to figure out how I can tell the system to stop when the Unassigned item hits a certain number. For example, if I start the system and I have a target of 5 unassigned items it will run until the unassigned items hits 5.

https://jsfiddle.net/b95fe18k/2/


r/JavaScriptHelp • • Oct 21 '20

❔ Unanswered ❔ Is there a way to read an MD file and translate it to HTML without using a server?

2 Upvotes

I'm trying to edit files in Markdown the same way I do HTML files.

With HTML, I edit the file in a text editor (I use Sublime Text) while keeping a browser window open to file:///Users/JesusIsMyZoloft/Desktop/etc. Whenever I want to see the changes, I simply save the file and refresh the page. This works well with HTML, but I'd like to extend it to MD files as well. (And eventually LaTeX, but that's another story)

The idea is to load an HTML document with nothing in the body, but a <script> tag in the head. This would call a script that would read the file, translate it into HTML, and then use jQuery to populate the body with the new content.

So there are two problems: reading the file and translating the file. One workaround I've tried for reading the file was to add a prefix and suffix like so:

var md = `

# Heading
Content of the file.

`

...and then add the following tag to the head of the HTML page:

<script type="text/javascript" src="file.md"></script>

...calling the MD file, as a JS file. This works... kinda... but I'm wondering if there's a more elegant solution. (Preferably one where Sublime doesn't try to warn me about the syntax error with big pink bars.)

The second problem is translating the file. I've found several repositories on GitHub for converting MD to HTML, but they all seem geared toward a Node server. What I need is a single function that takes in the MD file contents as a String, and returns it as HTML. (I suppose if it took in the file path as a string, and returned the HTML that would work too, solving both problems at once.)

Any help is appreciated!


r/JavaScriptHelp • • Oct 16 '20

❔ Unanswered ❔ Is it possible to check whether a website is down every so often and update a discord embed with the current status of the site?

2 Upvotes

Hey, Is it possible to check whether a website is down every so often and update a discord embed with the current status of the site? If it is would someone be able to give me some sample code? I really don't know where to start with this one. I know how to send Discord embeds I just don't know how to update a single one every let's say 60 seconds with the current status of a website.

Thanks in advance!


r/JavaScriptHelp • • Apr 05 '18

JavaScript Jungle

2 Upvotes

I decided to learn how to code a few months ago and after choosing JavaScript as my first computer language I am starting to doubt my choice. It seemed understandable at first until I realised just how many other languages I was going to have to learn in order to make my JavaScript useful. I know that technically I only need HTML, CSS and JavaScript but realistically there's also jQuery which I know is not classed as a language, .JSON of which I know little about and a few others I can't remember the names of. They all interact in some way. Can anyone out there give me some advice as to whether I have chosen wisely and should continue to grapple around in this JavaScript Jungle or whether I should try to learn another language first. By the way, I know what you are thinking: "Proper use of the English language would be a good start!".


r/JavaScriptHelp • • Jan 04 '18

What am I doing wrong?

2 Upvotes

I have been trying to make my own website for some time. But I can't seem to nail the last piece of js.


<function myFunction() { var x = document.getElementById("myTopnav"); if (x.className === "topnav") { x.className += " responsive"; } else { x.className = "topnav"; }

<script type="text/javascript"> jQuery(function($) { $(document).ready( function() { $('.navbar').stickUp(); }); }); </script>


Can someone help me with what I am doing wrong?

Thanks in advanced.

Pirate_Bunny


r/JavaScriptHelp • • Oct 26 '17

Capturing UserMedia (audio only), resampling and sending to NodeJS

2 Upvotes

Hey redditors

Hopefully amongst you there is someone who has dealt with this problem before. I know it sounds simple but after two days looking on every portal imaginable I give up trying to find the answer my self and I turn to you guys.

Unfortunately I know nothing about audio, sample-rates, bitrates, etc. And probably thats where my problem lays

Here it is: I’m building a softphone web client in JS

Client UI is supposed to load the UserMedia and capture the Audio, resample and stream in real time. Not collect and save to some file like a lot of online forums demonstrate.

I need the audio to be in Raw audio (pcm) format. 16000 samplerate. In chunks of 200ms ~320bytes (each chunk with the Raw audio header)

These chunks are to be sent over SocketIO to the NodeJS where the rest is already in place.

SocketIO, NodeJS and UI components are already done. So it’s literally this last bit.

Any help is greatly appreciated

EDIT: Here's a JSBin of what I've got so far. It looks almost accurate, but No actual sound comes out on the other end. https://jsbin.com/tuxebij/edit?html,js,output


r/JavaScriptHelp • • Mar 02 '22

❔ Unanswered ❔ Hello! I am new here and I was wondering if someone could help me with some javascript on the platform tradovate (I am not a coder)

1 Upvotes

Hello I am needing help with setting up an indicator on tradovate that will show me the min and max of delta. I have screenshots of what I want and on the platform they already have something close to what I want but it is missing certain things

I would post the pictures of what I want but it will not let me here


r/JavaScriptHelp • • Mar 02 '22

💡 Advice 💡 whenever i open an app i get following error, although javascript and cookies are both enabled on chrome and samsung Internet.

1 Upvotes

Access to this page has been denied because we believe you are using automation tools to browse the website.

This may happen as a result of the following:

Javascript is disabled or blocked by an extension (ad blockers for example) Your browser does not support cookies Please make sure that Javascript and cookies are enabled on your browser and that you are not blocking them from loading.

Reference ID: #dc6ac997-99d8-11ec-8fa2-78796862576b

Report an issue Using an ad-blocker (e.g. uBlock Origin)? Please disable it in order to continue.


r/JavaScriptHelp • • Feb 23 '22

❔ Unanswered ❔ It says that the html isnt declared(using notepad++)

1 Upvotes

<html> <head> <title>4 of my favourite places</title> </head> <body>

Hey, I'm Kelsi and I like visiting new places. <br><br> Here are my 4 favourite places.

this picture of snow valley where I go skiing during the winter.<br> <img src="SnowValley" width="300" height="250"> <br>

I usually go ski there with my family. The place has multiple places where one can go ski each varying in difficulty.<br>

This is a picture of where Downtown Toronto<br> <img src="DownTown"> <br>

I love Downtown Toronto as everything there feels big and I like the energy over there.<br>

My 3rd favourite place is Sunway Lagoon.<br> <img src="SunwayLagoon"> <br>

Sunway Lagoon is found in Malaysia. It is found in Malayasia and is owned by a hote company with its own mall next to it along with the hotel.<br>

My last favourite place is Canada Wonderland.<br> <img src="Wonderland"> <br>

Winter Wonderland is a giant amusement park with a lot of roller coasters.<br>

</body></html>


r/JavaScriptHelp • • Feb 01 '22

❔ Unanswered ❔ JS Function and return

1 Upvotes

https://imgur.com/gallery/NsRe1Bi

In this code, the console log for width and height have been printed as per the console.log that is placed inside the function(). But for dimensions=[width, height], it logs [undefined,undefined]. Now I understood the part in tutorial that it require a return statement to display the value.

But what I am confused is if in above case we do get console log of string for both width and height. Then why the same string are not being displayed in dimensions=[width,height] array.

Is it because inside function we are only doing a console.log ( print statement ) rather than storing the value anywhere?

Source: https://www.youtube.com/watch?v=2Ji-clqUYnA&t=776s&ab_channel=CodingAddict


r/JavaScriptHelp • • Jan 31 '22

❔ Unanswered ❔ How would i go abouts to disable a button for 12 hours?

1 Upvotes

I want to make an app where you can press a button, and after that it would be disabled and not clickable. It would start an 12 hour timer and after 12 hours the button would be clickable again. But im i dont know how to keep the timer going after the window is closed. Would i need a server of some sort?, or is it possible without?


r/JavaScriptHelp • • Jan 31 '22

❔ Unanswered ❔ Help with external JSON file to JavaScript array

1 Upvotes

Hi guys!

First time on r/JavaScriptHelp

working on extending my javascript skills past the occasional jQuery DOM manipulation, and I've run up against something I don't quite get.

I'm trying to load an array of arrays from an external JSON file. The external file (items.json) looks like:

 [
    [
"./listimages/steamtrain.jpg",
"1804",
"Steam Trains"
    ],
    [
"./listimages/beiber.jpg",
"2009",
"Justin Beiber 'One Time'"
    ],
    [
"./listimages/avril.jpg",
"2002",
"Avril Lavigne 'Complicated'"
    ],
    [
"./listimages/kfc.jpg",
"1952",
"Kentucky Fried Chicken"
    ],
    [
"./listimages/coke.jpg",
"1892",
"Coca Cola"
    ]
]

my code to pull this to an array is:

$.getJSON('items.json', function (data) {
if (data.length > 0) {

$.each(data, function (index, value) {
items.push(value);       // PUSH THE VALUES INSIDE THE ARRAY.
            });
        } else {
console.log("no data");
        }
console.log(items);
    });

The data does get assigned somehow because the console shows an array of 5 arrays with 3 items each, and expanding shows the items. However, the items are not accessible via index like items[0][0]. Get error cannot read properties of undefined.

Incidentally I can do a direct assignment and get the same result

items = data;

Please help me understand what I am not understanding about how this translates, and how to get a direct array translation.

Thanks much.


r/JavaScriptHelp • • Jan 22 '22

✔️ answered ✔️ I am trying to create an error text if there is no name in the input. Can someone explain why the code does not work?

1 Upvotes

Beginner here.... can someone explain why the code does not work? (suggesting a working solution is also fine)

https://codepen.io/tuggypetu/pen/QWqeyKY

been trying since yesterday...

=> I am trying to create an error text if there is no name in the input (edited)


r/JavaScriptHelp • • Jan 19 '22

❔ Unanswered ❔ Error while trying to install @discordjs/opus

1 Upvotes

I tried to install my discordbot on my raspberry pi. And it worked. Now we tried to install it on my friends raspberry pi but this error comes up:

npm ERR! code 1 npm ERR! path /home/pi/Desktop/SourceBot/node_modules/@discordjs/opus npm ERR! command failed npm ERR! command sh -c node-pre-gyp install --fallback-to-build npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/Desktop/SourceBot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-arm-glibc-2.24/opus.node --module_name=opus --module_path=/home/pi/Desktop/SourceBot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-arm-glibc-2.24 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using [email protected] npm ERR! node-pre-gyp info using [email protected] | linux | arm npm ERR! node-pre-gyp info check checked for "/home/pi/Desktop/SourceBot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-arm-glibc-2.24/opus.node" (not found) npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.7.0/opus-v0.7.0-node-v93-napi-v3-linux-arm-glibc-2.24.tar.gz npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.7.0/opus-v0.7.0-node-v93-napi-v3-linux-arm-glibc-2.24.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/[email protected] and [email protected] (node-v93 ABI, glibc) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.7.0/opus-v0.7.0-node-v93-napi-v3-linux-arm-glibc-2.24.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using [email protected] npm ERR! gyp info using [email protected] | linux | arm npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using [email protected] npm ERR! gyp info using [email protected] | linux | arm npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON npm ERR! gyp ERR! find Python checking if "python3" can be used npm ERR! gyp ERR! find Python - executable path is "/usr/bin/python3" npm ERR! gyp ERR! find Python - version is "3.5.3" npm ERR! gyp ERR! find Python - version is 3.5.3 - should be >=3.6.0 npm ERR! gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm ERR! gyp ERR! find Python checking if "python" can be used npm ERR! gyp ERR! find Python - executable path is "/usr/bin/python" npm ERR! gyp ERR! find Python - version is "2.7.13" npm ERR! gyp ERR! find Python - version is 2.7.13 - should be >=3.6.0 npm ERR! gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python ********************************************************** npm ERR! gyp ERR! find Python You need to install the latest version of Python. npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not, npm ERR! gyp ERR! find Python you can try one of the following options: npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable" npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm) npm ERR! gyp ERR! find Python - Set the environment variable PYTHON npm ERR! gyp ERR! find Python - Set the npm configuration variable python: npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable" npm ERR! gyp ERR! find Python For more information consult the documentation at: npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation npm ERR! gyp ERR! find Python ********************************************************** npm ERR! gyp ERR! find Python npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Python installation to use npm ERR! gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47) npm ERR! gyp ERR! stack at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21) npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:266:16) npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:297:7) npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:388:7) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16) npm ERR! gyp ERR! stack at Socket.<anonymous> (node:internal/child_process:450:11) npm ERR! gyp ERR! stack at Socket.emit (node:events:390:28) npm ERR! gyp ERR! stack at Pipe.<anonymous> (node:net:687:12) npm ERR! gyp ERR! System Linux 4.19.42-v7+ npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/Desktop/SourceBot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-arm-glibc-2.24/opus.node" "--module_name=opus" "--module_path=/home/pi/Desktop/SourceBot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-arm-glibc-2.24" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3" npm ERR! gyp ERR! cwd /home/pi/Desktop/SourceBot/node_modules/@discordjs/opus npm ERR! gyp ERR! node -v v16.13.2 npm ERR! gyp ERR! node-gyp -v v8.3.0 npm ERR! gyp ERR! not ok npm ERR! node-pre-gyp ERR! build error npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/Desktop/SourceBot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-arm-glibc-2.24/opus.node --module_name=opus --module_path=/home/pi/Desktop/SourceBot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-arm-glibc-2.24 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/Desktop/SourceBot/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20) npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28) npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16) npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) npm ERR! node-pre-gyp ERR! System Linux 4.19.42-v7+ npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/home/pi/Desktop/SourceBot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" npm ERR! node-pre-gyp ERR! cwd /home/pi/Desktop/SourceBot/node_modules/@discordjs/opus npm ERR! node-pre-gyp ERR! node -v v16.13.2 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.2 npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2022-01-19T22_52_22_476Z-debug.lo