druv5319 / Sneaks-API

A StockX, FlightClub, Goat, and Stadium Goods API all in one. This sneaker API allows users to search sneakers and track and compare prices while providing additional info such as product links and images
448 stars 118 forks source link

Integration problem with React App #23

Closed jain-aayush1123 closed 3 years ago

jain-aayush1123 commented 3 years ago

I have tried to integerate the api in React app and adding the simple line const SneaksAPI = require("sneaks-api"); gives the error Cannot read property 'prototype' of undefined

How to get rid of this or there are some other steps I need to follow?

nick-0101 commented 3 years ago

const SneaksAPI = require("sneaks-api"); is the import for nodejs, not React. You need to install nodejs and make an api call from React to your node server.