Интегрирующий модуль Discogs отключить узел в проекте Aurelia
Я использую aurelia.io, и я хотел бы использовать пакет npm "отключить" в моем приложении для обработки API Discogs. Устанавливаю нормально, набираю 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' }
Я не знаю, что не так... Если бы вы могли мне помочь, это было бы здорово:)
1 ответ
Решение
Как было сказано в ответе Эшли, моя проблема неразрешима так, как я хотел. Некоторые пакеты узлов сделаны только для серверов, а не для браузеров...