You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I am trying to use web3storage library but I am having problems when I try to run my server
Package path . is not exported from package D:\dev\demo\frontend\node_modules@web3-storage\w3up-client (see exports field in D:\dev\demo\frontend\node_modules@web3-storage\w3up-client\package.json)
I don't know how to fix this issue. This is a new typescript project
Here is my code:
import { create } from '@web3-storage/w3up-client';
export const getWeb3IpfsId = async (params: object | string) => {
const client = await create();
// first time setup!
if (!Object.keys(client.accounts()).length) {
// waits for you to click the link in your email to verify your identity
const account = await client.login(web3StorageEmail);
// create a space for your uploads
const space = await client.createSpace('power-voting');
// associate this space with your account
await account.provision(space.did());
// save the space to the store, and set as "current"
await space.save();
}
const json = JSON.stringify(params);
const data = new Blob([json]);
const cid = await client.uploadFile(data);
return cid;
}
The text was updated successfully, but these errors were encountered:
Hi! I am trying to use web3storage library but I am having problems when I try to run my server
Package path . is not exported from package D:\dev\demo\frontend\node_modules@web3-storage\w3up-client (see exports field in D:\dev\demo\frontend\node_modules@web3-storage\w3up-client\package.json)
I don't know how to fix this issue. This is a new typescript project
Here is my code:
The text was updated successfully, but these errors were encountered: