My bot made a mistake.
I tried to install the snekfetch module.
This happened.Could you help ?. My Boot Won’t Open.
My projects : Corwin.Glitch.Me
My bot made a mistake.
I tried to install the snekfetch module.
This happened.Could you help ?. My Boot Won’t Open.
My projects : Corwin.Glitch.Me
Try using
pnpm install snekfetch
But you should use the module node-fetch
because snekfetch is deprecated
Before trying any manual workarounds for npm
or pnpm
I suggest running enable-pnpm in the console. That’s often enough to fix any installation errors.
If that doesn’t resolve things, please provide your project name and someone can take a closer look.
Use enable-pnpm
first.
Anyway I recommend you to use node-fetch
module. It is pretty easy to use
const fetch = require('node-fetch');
const api = `https://www.url.com`;
fetch(api).then(res => res.json())
.then(json => {
console.log(json)
return;
}).catch(err => {
console.log(err);
return;
});