PokeAPI / pokeapi-js-wrapper

PokeAPI browser wrapper, fully async with built-in cache
Mozilla Public License 2.0
273 stars 43 forks source link

As a ReactJS underpart #20

Closed LuziferSenpai closed 3 years ago

LuziferSenpai commented 3 years ago

Hey,

shouldnt this work as a part of ReactJS?

Like when I just npm i pokeapi-js-wrapper --save and then try to import it, it errors out. I would love to have this working, because I'm not familiar with service worker, so yea.

Could not find a declaration file for module 'pokeapi-js-wrapper'. 'node_modules/pokeapi-js-wrapper/dist/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/pokeapi-js-wrapper if it exists or add a new declaration (.d.ts) file containing declare module 'pokeapi-js-wrapper';ts(7016)

Eskabore commented 3 years ago

Hey,

It seems you are not in the app root folder. I would suggest you switch directory from your console.

If you are in the parent folder, type:

cd <name_of_your_create-react-app> && npm i pokeapi-js-wrapper --save

Let me know if you get other ReactJS related issues

@eskabore

LuziferSenpai commented 3 years ago

Nop, I'm in the app directory. It still shows the error.

LuziferSenpai commented 3 years ago

I just deleted it out of the link above, because of privat data

Naramsim commented 3 years ago

The error you posted has nothing to do with reactjs. It's about Typescript types. We don't offer any types yet.

LuziferSenpai commented 3 years ago

Then it doesnt make sense to have a npm packet. They always need that. Even in my basic node project it errors with that.

LuziferSenpai commented 3 years ago

Okay, this issue is fixed somehow.

Naramsim commented 3 years ago

Npm is a Javascript registry. Millions of people are using Javascript for their projects.