在Aurelia项目中集成Discogs断开节点模块



我正在使用 aurelia.io,我想在我的应用程序中使用"断开连接"npm 包来处理 Discogs API。我正常安装它,在我的应用程序的文件夹中键入npm install disconnect --save。我还正确编辑aurelia.json以插入vendor-bundle.js部分: { "name": "disconnect", "path": "../node_modules/disconnect", "main": "index" },

然后我内置了我的应用程序键入au build,但是我收到此错误:

{ uid: 8,
  name: 'writeBundles',
  branch: false,
  error: 
   { Error: ENOENT: no such file or directory, open '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js'
       at Object.fs.openSync (fs.js:558:18)
       at Object.fs.readFileSync (fs.js:468:33)
       at Object.exports.readFileSync (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/file-system.js:49:13)
       at fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/bundled-source.js:83:31)
       at Object.context.fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:176:18)
       at Object.context.load (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:357:30)
       at Module.load (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:832:29)
       at Module.fetch (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:822:66)
       at Module.check (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:854:30)
       at Module.enable (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:1173:22)
     errno: -2,
     code: 'ENOENT',
     syscall: 'open',
     path: '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js',
     moduleTree: [ 'disconnect/index' ],
     fileName: '/home/cesar/projets/aurelia/tracklist-manager/node_modules/disconnect/index.js' },
  duration: [ 4, 789092986 ],
  time: 1490043332523 }
{ uid: 0,
  name: '<series>',
  branch: true,
  error: 
   { Error: ENOENT: no such file or directory, open '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js'
       at Object.fs.openSync (fs.js:558:18)
       at Object.fs.readFileSync (fs.js:468:33)
       at Object.exports.readFileSync (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/file-system.js:49:13)
       at fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/bundled-source.js:83:31)
       at Object.context.fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:176:18)
       at Object.context.load (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:357:30)
       at Module.load (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:832:29)
       at Module.fetch (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:822:66)
       at Module.check (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:854:30)
       at Module.enable (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:1173:22)
     errno: -2,
     code: 'ENOENT',
     syscall: 'open',
     path: '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js',
     moduleTree: [ 'disconnect/index' ],
     fileName: '/home/cesar/projets/aurelia/tracklist-manager/node_modules/disconnect/index.js' },
  duration: [ 8, 704096699 ],
  time: 1490043332559 }
{ Error: ENOENT: no such file or directory, open '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js'
    at Object.fs.openSync (fs.js:558:18)
    at Object.fs.readFileSync (fs.js:468:33)
    at Object.exports.readFileSync (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/file-system.js:49:13)
    at fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/bundled-source.js:83:31)
    at Object.context.fileRead (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:176:18)
    at Object.context.load (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:357:30)
    at Module.load (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:832:29)
    at Module.fetch (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:822:66)
    at Module.check (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:854:30)
    at Module.enable (eval at <anonymous> (/home/cesar/projets/aurelia/tracklist-manager/node_modules/aurelia-cli/lib/build/amodro-trace/lib/loader/Loader.js:14:1), <anonymous>:1173:22)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/cesar/projets/aurelia/tracklist-manager/disconnect/lib/util.js',
  moduleTree: [ 'disconnect/index' ],
  fileName: '/home/cesar/projets/aurelia/tracklist-manager/node_modules/disconnect/index.js' }

我不知道怎么了...如果你能帮助我,那就太好:)

正如阿什利的回答中提到的,我的问题无法按照我想要的方式解决。某些节点包仅适用于服务器而不是浏览器...

相关内容

  • 没有找到相关文章

最新更新