未捕获的错误:不匹配的匿名定义模块:函数{return uuid;}

问题描述

我已经使用

安装了 pinata SDK
npm install --save @pinata/sdk

我正在使用 pinata 实现将文件添加到 IPFS 的代码

const pinataSDK= require('@pinata/sdk');
const pinata = pinataSDK('812f8a2d416d9be9afea','668516ac85834685ed785bcaec839f5ad1aeca099788cd8aa814ccdbad77d1bb');
    console.log("entered");
pinata.testAuthentication().then((result) => {
    //handle successful authentication here
    console.log(result);
}).catch((err) => {
    //handle error here
    console.log(err);
});

const fs = require('fs');
const readableStreamForFile = fs.createReadStream('./naruto6.jpeg');
const options = {
    pinataMetadata: {
        name: MyCustomName,keyvalues: {
            customKey: 'customValue',customKey2: 'customValue2'
        }
    },pinataOptions: {
        cidVersion: 0
    }
};
pinata.pinFiletoIPFS(readableStreamForFile,options).then((result) => {
    //handle results here
    console.log(result);
}).catch((err) => {
    //handle error here
    console.log(err);
});

我遇到了以下错误

https://requirejs.org/docs/errors.html#notloaded

https://requirejs.org/docs/errors.html#mismatch

enter image description here

我已经安装了 require.js 节点模块。我无法正确理解错误。我是 js 的新手。请帮帮我。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...