Answer the question
In order to leave comments, you need to log in
How to import the fetch module?
Hello, I am using fetch to get data from api. But it needs to be imported. Downloaded. I tried to do it in different ways, both through import and through require, but everything gives an error. Here's what I have now, at the request of the console in the file node_modules/node-fetch/package.json removed the line "type": "module" .
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question