当先锋百科网

首页 1 2 3 4 5 6 7

别人也遇到过这个问题【但是没有解决方案,我已解决】:https://www.reddit.com/r/monerosupport/comments/15gol3w/encountering_url_parse_error_with_monero/?rdt=47049

基于【Monoro-JavaScript】的各种问题?为啥?这里使用最简单的案例测试【基于Node V18或以上版本运行---肯定会报下面的错误,但是基于Node V16版本以下运行,是没问题的!】

import moneroJS from "monero-javascript";



(async () => {
    
     let wallet = await moneroJS.createWalletKeys(
        { 
            networkType: moneroJS.MoneroNetworkType.MAINNET
        });
    console.log(wallet);   

})();


为此,以下问题的根源就是你Node版本的问题【当前建议使用Node 16的版本---这个版本是最稳定的】 Node 18以上的版本,很多库不兼容【后续还有很多的路要走....】

错误提示:node_modules\monero-javascript\dist\monero_wallet_keys.js:9
 

Encountering URL Parse Error with Monero JavaScript Library – Has Anyone Else Faced This?
I've encountered an error while working with the Monero JavaScript library, which can be found at [this GitHub link](https://github.com/monero-ecosystem/monero-javascript). The error message I'm receiving is:
```
错误提示:Error posting message to MoneroWebWorker.js; is it copied to the app's build directory (e.g. in the root)?
错误提示:TypeError [Error]: Failed to parse URL from /home/p/Documents/Html test/node_modules/monero-javascript/dist/monero_wallet_full.wasm
```
Has anyone come across this issue before? I can provide the code I'm using if that would help.