kosciukiewicz / sbc-solver

Automatic solver designed to tackle squad building challenges (SBCs) from the EA FC 24 game using genetic algorithms.
MIT License
4 stars 0 forks source link

Can't find "react_app/static/js/main.f4114b81.js" #2

Open moudimash99 opened 2 weeks ago

moudimash99 commented 2 weeks ago

Hello I was looking over your code, which is absolutely amazing btw, and I was trying to run it myself. I must say this is not an issue per-say but a question on running it In the manifest for the chrome extension, it requires a js file main from react that I'm unsure where it should be located from. How would one solve this issue or run the app?

kosciukiewicz commented 2 weeks ago

Sure, If You want to make some changes in the app You should use the ./scripts/build_extension.sh to build an extension.

The reason for that is that every built js file contains individual hash part. The provided scripts handles all the changes and replace the proper names in the manifest file. Feel free to ask if You have any more issues.

vm10ks commented 2 weeks ago

Sure, If You want to make some changes in the app You should use the ./scripts/build_extension.sh to build an extension.

The reason for that is that every built js file contains individual hash part. The provided scripts handles all the changes and replace the proper names in the manifest file. Feel free to ask if You have any more issues.

hi there i was trying to build it with multiple approaches since that sh file doesnt work, i tried to install yarn in the directory of it said unable to do so because we dont have auth access to ti , even when i tried to load it into chrome it didnt work same error as the guy mentioned up here

log: Cleaning before build... Done Building react app... warning ......\package.json: No license field 'react-scripts' is not recognized as an internal or external command, operable program or batch file. error Command failed with exit code 1. Done Copying build react app contents... mkdir: cannot create directory ‘./chrome_extension/react_app’: No such file or directory cp: cannot stat './build/*': No such file or directory Done Injecting static files to chrome extension... find: ‘./chrome_extension/react_app/static/js’: No such file or directory basename: missing operand Try 'basename --help' for more information. find: ‘./chrome_extension/react_app/static/css’: No such file or directory basename: missing operand Try 'basename --help' for more information. find: ‘./chrome_extension/react_app/static/js’: No such file or directory basename: missing operand Try 'basename --help' for more information. find: ‘./chrome_extension/react_app/static/media’: No such file or directory basename: missing operand Try 'basename --help' for more information. sed: can't read ./chrome_extension/manifest.json: No such file or directory sed: can't read ./chrome_extension/background.js: No such file or directory Done

kosciukiewicz commented 2 weeks ago

Should be resolved now:

  1. I attached the ea_sbc_solver_engine npm package to the sbc-solver repository and made it public;
  2. Added repo .npmrc config file;
  3. Updated README;

I tested building the app on freshly cloned repo on different github credentials - should be fine now.

Remember that to access the github npm registry the credentials in .npmrc are needed. I set up my credentials in user level file ~/.npmrc (You can generate the personal access token in your github profile developer settings):

//npm.pkg.github.com/:_authToken={YOU_PERSONAL_ACCESS_TOKEN}
@NAMESPACE:registry=https://npm.pkg.github.com/
vm10ks commented 1 week ago

Should be resolved now:

  1. I attached the ea_sbc_solver_engine npm package to the sbc-solver repository and made it public;
  2. Added repo .npmrc config file;
  3. Updated README;

I tested building the app on freshly cloned repo on different github credentials - should be fine now.

Remember that to access the github npm registry the credentials in .npmrc are needed. I set up my credentials in user level file ~/.npmrc (You can generate the personal access token in your github profile developer settings):

//npm.pkg.github.com/:_authToken={YOU_PERSONAL_ACCESS_TOKEN}
@NAMESPACE:registry=https://npm.pkg.github.com/

i put my token as you said in .npmrc but here is the logs :

build sh file logs : $ ./scripts/build_extension.sh Cleaning before build... Done Building react app... warning ......\package.json: No license field 'react-scripts' is not recognized as an internal or external command, operable program or batch file. error Command failed with exit code 1. Done Copying build react app contents... cp: cannot stat './build/*': No such file or directory Done Injecting static files to chrome extension... find: ‘./chrome_extension/react_app/static/js’: No such file or directory basename: missing operand Try 'basename --help' for more information. find: ‘./chrome_extension/react_app/static/css’: No such file or directory basename: missing operand Try 'basename --help' for more information. find: ‘./chrome_extension/react_app/static/js’: No such file or directory basename: missing operand Try 'basename --help' for more information. find: ‘./chrome_extension/react_app/static/media’: No such file or directory basename: missing operand Try 'basename --help' for more information. Done

and google chrome load unpacked log : Failed to load extension File ~\Desktop\sbc-solver-master (2)\chrome_extension Error Could not load javascript 'react_app/static/js/main.f4114b81.js' for script. Could not load manifest.

kosciukiewicz commented 1 week ago

Based on:

'react-scripts' is not recognized as an internal or external command

You should probably run yarn install to install all required packages. If you filled the token correctly, all packages, optimization_sbc_solver_engine included, should be installed smoothly.