Comments (13)
a969836 ought to fix the issue and is committed to master.
Thanks, I needed to update my npm.
from monero-ts.
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.
Thanks for responding! I pulled the new commit, and it still doesn't work. Does it work for you?
from monero-ts.
Bump webpack-cli
to 4.8.0
and related deps latest should fix that one.
from monero-ts.
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.
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.
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.
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.
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.
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.
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.
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.
Awesome! That is exactly what I was looking for, thank you! I can't believe I missed that...
from monero-ts.
Related Issues (20)
- TypeDocs missing nested sub-properties
- cannot use it with yarn 2+ due to @babel/runtime dependency HOT 1
- Transaction hash of signed transaction hex HOT 2
- npm package version outdated HOT 2
- Browser wallet fails to connect to remote daemon. HOT 7
- Addressing Moderate Security Vulnerabilities in Dependencies HOT 1
- node: bad option: --experimental-wasm-threads HOT 2
- Path not found for MoneroWebWorker.js HOT 4
- Type-docs page is missing entirely HOT 2
- Can't use openWalletFull together with a ConnectionManager HOT 4
- Errors swallowed in onOutputReceived and addListener HOT 1
- rpc calls create unresolved timeouts/promises until HttpClient.DEFAULT_TIMEOUT as such jest tests warning HOT 4
- unable to run multiple MoneroUtils.getIntegratedAddress in parallel HOT 1
- Broken links in documentation HOT 1
- getBalances doc is not correct HOT 2
- Can't open wallet by keys HOT 3
- Failed to parse URL HOT 17
- Monero-ts in NextJS dev server leads to hangup HOT 9
- MoneroWalletKeys.createSubaddress() not supported HOT 1
- Bounty system test [0.1 XMR] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monero-ts.