奥里利亚使用羽毛认证的客户端

问题描述:

当依赖性的问题,我一个NPM包添加到我的aurelia.json文件奥里利亚使用羽毛认证的客户端

{ 
    "name": "feathers-authentication-client", 
    "path": "../node_modules/feathers-authentication-client/lib", 
    "main": "index" 
} 

然后我将其导入

import * as auth from 'feathers-authentication-client';

,但我不断收到此错误:

{ Error: ENOENT: no such file or directory, open 'C:\path\to\project-folder\src\feathers-errors.js' ...

如果我也将这个软件包添加到aurelia.json,那么我得到相同的错误,但依赖feathers-errors etc ..等

感谢@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"] 
    } 
    
+1

我与我们的CLI团队合作,看是否可以自动与'AU完成安装' –

+1

非常感谢@AshleyGrant – maximedubois