Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Can't resolve 'console' #14

Closed
Huynheddie opened this issue Nov 25, 2021 · 2 comments
Closed

Module not found: Can't resolve 'console' #14

Huynheddie opened this issue Nov 25, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@Huynheddie
Copy link

Description
I set up my project using create-react-app and installed Galeforce, but when I try to import the package I get an error in the terminal: Module not found: Can't resolve 'console' in 'D:\Projects\LoLTest\node_modules\ts-node\dist'.

Reproduction Steps

  1. Create a new project by running the command npx create-react-app LoLTest
  2. In the project directory, install Galeforce by running npm i galeforce
  3. In the App.js file, import Galeforce using the following code:
    import GaleforceModule from 'galeforce';
  4. Run npm start and the page will fail to display due to the compile error described above

Specifications (please complete the following information):

  • OS: Windows
@Huynheddie Huynheddie added the bug Something isn't working label Nov 25, 2021
@bangingheads
Copy link

JavaScript libraries like these are meant to be ran in the back end on node.js, not compiled into the front end like React.

If you were to use it on the front end you would be exposing your API key to everyone which is against Riot's developer policies as well as someone could get your key blacklisted.

@b-cho
Copy link
Owner

b-cho commented Mar 7, 2022

Going to resolve this as I don't think this is a fixable issue at the moment. Will see what I can do about this in the future though.

@b-cho b-cho closed this as completed Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants