I installed the newsapi npm package to us in my node. It works perfectly in my localhost but when I hover on the
const newsAPI = require("newsapi ,
it says :
module "c:/Users/Godson/OneDrive/Documents/GitHub/blog/node_modules/newsapi/dist/index" Could not find a declaration file for module 'newsapi'. 'c:/Users/Godson/OneDrive/Documents/GitHub/blog/node_modules/newsapi/dist/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/newsapi if it exists or add a new declaration (.d.ts) file containing declare module 'newsapi';
and this affects my repo when I deploy to render, it also says
Error: Cannot find module "newsapi.
I installed the newsapi npm package to us in my node. It works perfectly in my localhost but when I hover on the
const newsAPI = require("newsapi
, it says :module "c:/Users/Godson/OneDrive/Documents/GitHub/blog/node_modules/newsapi/dist/index" Could not find a declaration file for module 'newsapi'. 'c:/Users/Godson/OneDrive/Documents/GitHub/blog/node_modules/newsapi/dist/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/newsapi if it exists or add a new declaration (.d.ts) file containing declare module 'newsapi';
and this affects my repo when I deploy to render, it also saysError: Cannot find module "newsapi
.My node version is v16.15.1