问题描述
我以这段代码为例。 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 (将#修改为@)