Code Monkey home page Code Monkey logo

Comments (13)

woodser avatar woodser commented on May 17, 2024 1

a969836 ought to fix the issue and is committed to master.

Thanks, I needed to update my npm.

from monero-ts.

jeffro256 avatar jeffro256 commented on May 17, 2024 1

Thanks for the help! Note: I get the same error for npm install -D webpack, but I don't thinks it's really relevant. I think I now understand how to make a static build. One more question, unrelated: is their a way to get the keysData and the cacheData from a MoneroWalletKeys WASM object?

from monero-ts.

jeffro256 avatar jeffro256 commented on May 17, 2024

Thanks for responding! I pulled the new commit, and it still doesn't work. Does it work for you?

from monero-ts.

trasherdk avatar trasherdk commented on May 17, 2024

Bump webpack-cli to 4.8.0 and related deps latest should fix that one.

from monero-ts.

woodser avatar woodser commented on May 17, 2024

Thanks for responding! I pulled the new commit, and it still doesn't work. Does it work for you?

No actually, I had the same error running npm install -D webpack-cli.

But @trasherdk's suggestion worked by updating webpack-cli to 4.8.0. Resolved by #65

from monero-ts.

jeffro256 avatar jeffro256 commented on May 17, 2024

Okay we're making progress, cause now I've got a new error. Go easy on me if I'm just being a noob, Ithis is my first experience with webpack ;). I ran npm install -D webpack-cli seemingly successfully. However, when I run the command npx webpack I get this message (I replaced the actual root folder name on my system with a placeholder):

assets by status 0 bytes [cached] 1 asset

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value.
Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/

ERROR in main
Module not found: Error: Can't resolve './src' in '<THE REPO ROOT DIRECTORY>'
resolve './src' in '<THE REPO ROOT DIRECTORY>'
  using description file: <THE REPO ROOT DIRECTORY>/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: <THE REPO ROOT DIRECTORY>/package.json (relative path: ./src)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        <THE REPO ROOT DIRECTORY>/src is not a file
      .js
        Field 'browser' doesn't contain a valid alias configuration
        <THE REPO ROOT DIRECTORY>/src.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        <THE REPO ROOT DIRECTORY>/src.json doesn't exist
      .wasm
        Field 'browser' doesn't contain a valid alias configuration
        <THE REPO ROOT DIRECTORY>/src.wasm doesn't exist
      as directory
        existing directory <THE REPO ROOT DIRECTORY>/src
          using description file: <THE REPO ROOT DIRECTORY>/package.json (relative path: ./src)
            using path: <THE REPO ROOT DIRECTORY>/src/index
              using description file: <THE REPO ROOT DIRECTORY>/package.json (relative path: ./src/index)
                no extension
                  Field 'browser' doesn't contain a valid alias configuration
                  <THE REPO ROOT DIRECTORY>/src/index doesn't exist
                .js
                  Field 'browser' doesn't contain a valid alias configuration
                  <THE REPO ROOT DIRECTORY>/src/index.js doesn't exist
                .json
                  Field 'browser' doesn't contain a valid alias configuration
                  <THE REPO ROOT DIRECTORY>/src/index.json doesn't exist
                .wasm
                  Field 'browser' doesn't contain a valid alias configuration
                  <THE REPO ROOT DIRECTORY>/src/index.wasm doesn't exist

from monero-ts.

woodser avatar woodser commented on May 17, 2024

I get the same error running npx webpack. But why run this command when it's not in the instructions or build scripts?

from monero-ts.

jeffro256 avatar jeffro256 commented on May 17, 2024

Sorry that's how I assumed to build webpack for this repo. Are there any instructions on how to do this? Thanks!

from monero-ts.

woodser avatar woodser commented on May 17, 2024

If you just want to use the library in your own web app, I recommend looking at monero-deposit-scanner for an example of importing and bundling the library in a web app.

Otherwise, you can build all library assets yourself by running ./bin/build_all.sh: https://github.com/monero-ecosystem/monero-javascript#building-webassembly-binaries-from-source

Webpack is used to bundle the library's included mocha tests as a browser application to run tests in a browser. This can be explicitly created with ./bin/build_browser_tests.sh.

from monero-ts.

woodser avatar woodser commented on May 17, 2024

One more question, unrelated: is their a way to get the keysData and the cacheData from a MoneroWalletKeys WASM object?

No, because a keys-only wallet has no state data; everything is deterministically derived from the input keys.

from monero-ts.

jeffro256 avatar jeffro256 commented on May 17, 2024

Hmm, that's what I thought. Is there then a way to get a stream output from MoneroWalletFull instead of saving it to a path? I ask all these questions because I want a full wallet with the sync/cache data, but I don't want to save it directly to a file system. Thanks so much for your help, and sorry for the spam.

from monero-ts.

woodser avatar woodser commented on May 17, 2024

Is there then a way to get a stream output from MoneroWalletFull instead of saving it to a path?

Yes, with wallet.getData():

let data = await wallet.getData(); // data[0] is the keys DataView, data[1] is the cache DataView

Thanks so much for your help, and sorry for the spam.

No problem at all.

from monero-ts.

jeffro256 avatar jeffro256 commented on May 17, 2024

Awesome! That is exactly what I was looking for, thank you! I can't believe I missed that...

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.