Git Product home page Git Product logo

Comments (10)

woodser avatar woodser commented on July 30, 2024

MoneroWebWorker.dist.js was renamed to monero_web_worker.dist.js for consistency with the other files built to ./dist. Nothing should be referencing MoneroWebWorker.dist.js anymore. Perhaps the browser needs hard refreshed to use the new file name, or if you build the WASM files yourself, perhaps they need rebuilt?

from monero-ts.

hundehausen avatar hundehausen commented on July 30, 2024

Hey,
I already tested with a fresh browser install and all cache cleared. We don't build the WASM files ourselves, we just copy the files from monero-javascript dist folder to our dist folder.

from monero-ts.

woodser avatar woodser commented on July 30, 2024

I searched the current dist files and source just to be sure there are no old references to MoneroWebWorker.dist.js.

Your web application is attempting to use the old path suggesting it's not built with monero-javascript-v0.5.0. It should use the correct, updated path after being rebuilt and restarted. This can be confirmed by ensuring the old path to MoneroWebWorker.dist.js is not referenced anywhere in the built web application.

from monero-ts.

hundehausen avatar hundehausen commented on July 30, 2024

I am pretty sure I use v0.5.0 in the branch dockerize and I also checked the monero-javascript/package.json in the node modules folder. It is v0.5.0. I downgraded webpack to version 4.44.2 and ran "npm run build". I get the following error:
ERROR in ../node_modules/monero-javascript/src/main/js/wallet/MoneroWalletRpc.js Module not found: Error: Can't resolve 'child_process' in '/Users/username/Coding/TipDocker/projects/tipxmr-frontend/node_modules/monero-javascript/src/main/js/wallet' @ ../node_modules/monero-javascript/src/main/js/wallet/MoneroWalletRpc.js 116:19-43 @ ../node_modules/monero-javascript/index.js @ ./libs/monero.js

from monero-ts.

hundehausen avatar hundehausen commented on July 30, 2024

Does this file need to be renamed?

from monero-ts.

woodser avatar woodser commented on July 30, 2024

That error is a good sign since it means the web app is building with v0.5.0.

"child_process" needs added to the node.js exclusion list in the webpack configuration here

Does this file need to be renamed?

No because it's a source file using the camelcase convention, whereas only the built files in ./dist use underscores.

from monero-ts.

hundehausen avatar hundehausen commented on July 30, 2024

Thank you that helped to remove the build errors related to monero. I still get other errors regarding tailwind css.
I still get the
404 not found http://localhost:8080/MoneroWebWorker.dist.js
error. Why do I have to build the project? I can not remember doing this earlier. Sorry for being such a noob :D

from monero-ts.

woodser avatar woodser commented on July 30, 2024

When npm start is called, the web app is built automatically to a directory then hosted by a server to access in a browser. In your case, this directory is ./dist per your webpack.config.js.

Something in your ./dist directory must still reference MoneroWebWorker.dist.js. This can be confirmed by running cd ./dist && grep -rni "MoneroWebWorker.dist.js" * -- if any output is generated it's using old build assets.

This would suggest the web app isn't correctly building, updating ./dist, and starting with npm start.

You can try deleting the ./dist directory to ensure the web app is only using the most up-to-date build, then npm start. This should resolve the error accessing MoneroWebWorker.dist.js.

I tried to build your current dockerize branch but I get a compile error:

ERROR in ./styles.css (../node_modules/css-loader/dist/cjs.js??ref--6-1!../node_modules/postcss-loader/dist/cjs.js??ref--6-2!./styles.css)
Module build failed (from ../node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'config'. These properties are valid:
   object { postcssOptions?, execute?, sourceMap?, implementation? }
    at validate (/Users/woodser/git/tipxmr/node_modules/postcss-loader/node_modules/schema-utils/dist/validate.js:104:11)
    at Object.loader (/Users/woodser/git/tipxmr/node_modules/postcss-loader/dist/index.js:43:29)
 @ ./styles.css 2:26-153 53:4-74:5 56:18-145
 @ ./index.js

ERROR in ./components/Loading.css (../node_modules/css-loader/dist/cjs.js??ref--6-1!../node_modules/postcss-loader/dist/cjs.js??ref--6-2!./components/Loading.css)
Module build failed (from ../node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'config'. These properties are valid:
   object { postcssOptions?, execute?, sourceMap?, implementation? }
    at validate (/Users/woodser/git/tipxmr/node_modules/postcss-loader/node_modules/schema-utils/dist/validate.js:104:11)
    at Object.loader (/Users/woodser/git/tipxmr/node_modules/postcss-loader/dist/index.js:43:29)
 @ ./components/Loading.css 2:26-160 53:4-74:5 56:18-152
 @ ./components/Loading.js
 @ ./components/index.js
 @ ./App.js
 @ ./index.js

from monero-ts.

hundehausen avatar hundehausen commented on July 30, 2024

Thank you woodser. I found the problem. I dockerized the whole project and I did not realize, that I have to rebuild the docker image of the frontend to update the node_modules. So I have to find a way, that the docker container doesn't install the modules inside the container rather than mapping the node_modules folder from external. Sorry for the issue 😅

from monero-ts.

woodser avatar woodser commented on July 30, 2024

Glad to hear it.

from monero-ts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.