我正在开发一个 Angular6+实体应用程序(代码库)。应用程序本身取决于:
"crypto-js": "^3.1.9-1",
"rdflib": "^0.19.0",
"solid-auth-client": "^2.2.6",
"stream": "0.0.2",
"webcrypto": "^0.1.1",
"zone.js": "^0.8.26"
我正在尝试使用以下方法删除 RDF 资源rdflib.UpdateManager.update()
:
$rdf.UpdateManager(this.store).update(toBeDeleted, [], (uri, ok, message, response) => {
if (ok) {
console.log('DELETED')
} else {
console.warn(message)
}
})
UpdateManager
你可以在这里找到更多关于 JSDoc和 rdflib.js 的介绍。
现在,使用 Firefox 63.0b12 (64-bit)
,我不断收到以下错误,我认为这可能与访问WebCrypto API 应限制在安全来源(即https://
页面)有关。使用 Opera 时会触发相同的错误。
Unhandled Promise rejection: Cannot find module "../algorithms/RSASSA-PKCS1-v1_5". ; Zone: <root> ; Task: Promise.then ; Value: Error: Cannot find module "../algorithms/RSASSA-PKCS1-v1_5".
at webpackEmptyContext (algorithms sync:2)
at SupportedAlgorithms.normalize (SupportedAlgorithms.js:84)
at SubtleCrypto.importKey (SubtleCrypto.js:279)
at RSASSA_PKCS1_v1_5.importKey (RSASSA-PKCS1-v1_5.js:124)
at Function.importKey (JWA.js:113)
at Function.importKey (JWK.js:46)
at Function.issueFor (PoPToken.js:57)
at webid-oidc.js:183
at fetchWithCredentials (authn-fetch.js:63)
at authn-fetch.js:41 Error: Cannot find module "../algorithms/RSASSA-PKCS1-v1_5".
at webpackEmptyContext (http://localhost:4200/main.js:11:10)
at SupportedAlgorithms.normalize (http://localhost:4200/vendor.js:132732:107)
at SubtleCrypto.importKey (http://localhost:4200/vendor.js:132336:51)
at RSASSA_PKCS1_v1_5.importKey (http://localhost:4200/vendor.js:124747:28)
at Function.importKey (http://localhost:4200/vendor.js:125342:34)
at Function.importKey (http://localhost:4200/vendor.js:125411:18)
at Function.issueFor (http://localhost:4200/vendor.js:127189:18)
at http://localhost:4200/vendor.js:185374:44
at fetchWithCredentials (http://localhost:4200/vendor.js:184423:49)
at http://localhost:4200/vendor.js:184401:16
我是否缺少 npm 依赖项?这个问题的根本原因是什么?