Uncaught (in promise) TypeError: Object prototype may only be an Object or null: undefined

问题描述

我想将文件上传到实体容器。

我以这段代码为例。 https://github.com/jeff-zucker/solid-file-client/blob/master/docs/node-upload.md

不同之处在于我使用 solid-auth-fetcher 进行授权。代码看起来像这样

const auth = require('solid-auth-cli')
const fc = new SolidFileClient(auth)
await fc.copyFile("file:///home/m0nte-cr1st0/fasf.jpg","https://dimadmytruk23.inrupt.net/fasf.jpg" )

用户上传文件时已经登录

但是,我收到以下错误

polyfills.js:139 Uncaught (in promise) TypeError: Object prototype may only be an Object or null: undefined
    at Function.setPrototypeOf (<anonymous>)
    at polyfills.js:139
    at patch (polyfills.js:141)
    at patch (graceful-fs.js:104)
    at Object.<anonymous> (graceful-fs.js:96)
    at Object../node_modules/graceful-fs/graceful-fs.js (graceful-fs.js:373)
    at __webpack_require__ (bootstrap:789)
    at fn (bootstrap:150)
    at Object../node_modules/solid-rest/node_modules/fs-extra/lib/fs/index.js (index.js:5)
    at __webpack_require__ (bootstrap:789)
    at fn (bootstrap:150)
    at Object../node_modules/solid-rest/node_modules/fs-extra/lib/index.js (index.js:5)
    at __webpack_require__ (bootstrap:789)
    at fn (bootstrap:150)
    at Object.<anonymous> (file.js:4)
    at Object../node_modules/solid-rest/src/file.js (file.js:214)
    at __webpack_require__ (bootstrap:789)
    at fn (bootstrap:150)
    at setRestHandlers (index.js:10)
    at Object.fetch (index.js:33)
    at SolidFileClient.fetch (SolidApi.js:140)
    at SolidFileClient.get (SolidApi.js:155)
    at SolidFileClient.copyFile (SolidApi.js:515)
    at Transcription.tsx:53

文件在那里。路径正确。

解决方法

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

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

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

相关问答

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