-1

Description?

I'm working on a ReactNative app, and I was trying to make an HTTP request on an API. The implementation in use works fine (I've been using it for a while now).

Screen Shot 2022-01-29 at 20 46 47

But with this new version 3.2.0, when i import the file, I immediately get Unable to resolve module node:http in my the console cmd, and also this suggestion below.

If you are sure the module exists, try these steps:

  1. Clear watchman watches: watchman watch-del-all
  2. Delete node_modules and run yarn install
  3. Reset Metro's cache: yarn start --reset-cache
  4. Remove the cache: rm -rf /tmp/metro-*

Reproduction Steps to reproduce the behavior:

  1. yarn add node-fetch
  2. run the code above ( image )

Expected behavior

Screenshots Screen Shot 2022-01-29 at 20 51 57

Your Environment

software version
node-fetch 3.2.0
node 16.13.1
npm 8.1.2
Operating System Mac OS X (macOS)

Additional context

1 Answers1

0

reverting back to 2.6.1 worked for me, I had a similar error where node:buffer could not be found