使用身份验证客户端时出现Aurelia依赖项问题
我将npm包添加到aurelia.json文件中使用身份验证客户端时出现Aurelia依赖项问题,aurelia,feathersjs,Aurelia,Feathersjs,我将npm包添加到aurelia.json文件中 { "name": "feathers-authentication-client", "path": "../node_modules/feathers-authentication-client/lib", "main": "index" } 然后我导入它 import*作为“身份验证客户端”的身份验证 但我一直在犯这样的错误: {错误:enoint:没有这样的文件或目录,请打开'C:\path\to\project
{
"name": "feathers-authentication-client",
"path": "../node_modules/feathers-authentication-client/lib",
"main": "index"
}
然后我导入它
import*作为“身份验证客户端”的身份验证代码>
但我一直在犯这样的错误:
{错误:enoint:没有这样的文件或目录,请打开'C:\path\to\project folder\src\feathers errors.js'…
如果我也将此包添加到aurelia.json中,则会出现相同的错误,但依赖于羽毛错误
等。感谢@AshleyGrant的帮助。以下是解决方案:
- 确保在
aurelia.json
文件中的dependencies
下有此项
{
"name": "feathers-client",
"path": "../node_modules/feathers-client/dist",
"main": "feathers"
},
{
"name": "feathers-authentication-client",
"main": "lib/index",
"path": "../node_modules/feathers-authentication-client",
"resources": []
},
"feathers-errors",
"ms",
{
"name": "debug",
"main": "browser",
"path": "../node_modules/debug"
},
{
"name": "jwt-decode",
"main": "index",
"path": "../node_modules/jwt-decode/lib",
"resources": ["base64_url_decode.js", "atob.js"]
}
我正在与我们的CLI团队合作,看看是否可以通过au-install自动完成这项工作