第一个文件是:index.js

import { create } from 'ipfs-http-client'

// connect to the default API address http://localhost:5001
const client = create();

// call Core API methods
const { cid } = await client.add('Hello world!');

console.log(cid);

等等

{
  "type": "module",
  "dependencies": {
    "ipfs-http-client": "^56.0.3"
  }
}