Coder Social home page Coder Social logo

node-superfetch's Issues

node-fetch ESM support

Please describe the problem you are having in as much detail as possible:
Some months ago node-fetch dropped support for CJS, and they have totally moved to ESM. I'd like to know if you convert n-superfetch for ESM support, since node-fetch v2 is no longer have active development, and prefer to move to v3

  • node-superfetch version: 0.2.3
  • Node.js version: 16.13.2
  • Operating system: Ubuntu
  • Priority this issue should have – please be realistic and elaborate if possible: Medium since some pepes still want to stick with CJS and it might be a bit difficult for newbies to adopt ESM.

TypeError: response.buffer is not a function

Please describe the problem you are having in as much detail as possible:
TypeError: response.buffer is not a function. This is likely a node-related issue. Please add support.

The alternative to .buffer() is now .arrayBuffer()

Further details:

  • node-superfetch version: 3.0.0
  • Node.js version: v18.10.0
  • Operating system: Arch Linux

error

Please describe the problem you are having in as much detail as possible:
some unknown error occurs when I'm trying to run my project

/home/root/lfheroes-bot/node_modules/node-superfetch/index.js:136
        Request[method.toLowerCase()] = (url, options) => new Request({ url, method, ...options });
                                                                                     ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/root/lfheroes-bot/node_modules/hastebgen-js/index.js:1:79)

Further details:

  • node-superfetch version: 0.19
  • Node.js version: 6.9.0
  • Operating system: ubuntu 18.04.2
  • Priority this issue should have – please be realistic and elaborate if possible: HIGH

headers

Please describe the problem you are having in as much detail as possible:
How do I use headers with this (an example would be nice)

Further details:

  • node-superfetch version:
  • Node.js version:
  • Operating system:
  • Priority this issue should have – please be realistic and elaborate if possible:

[typings] Cannot find name Blob

When compiling with gulp, the error below is thrown.

[13:16:10] Using gulpfile ~\Documents\Development\Cooking\cooking-tools\gulpfile.js
[13:16:10] Starting 'default'...
[13:16:10] Finished 'default' after 52 ms 
path-to-/node_modules/node-superfetch/typings/index.d.ts(5,45): error TS2304: Cannot find name 'Blob'.

That refers to this line:

type RequestBody = null | string | Buffer | Blob | NodeJS.ReadableStream;

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.