невозможно запустить Hyperledger Explorer

Когда я пытаюсь запустить проводник с помощью команды (./start.sh), появляется это сообщение (***** Пожалуйста, проверьте журнал [logs / console / console-2019-08-09.log] на наличие ошибок ** ***)

Содержимое файла журнала:

module.js:550
    throw err;
    ^
Error: Cannot find module 'helmet'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/shikah/fabric/blockchain-explorer/main.js:11:16)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

В файле main.js я попытался заменить «require» на «import», но это не решило проблему.

Содержимое файла Main.js:

//Part of the main.js file:

const express = require('express');   
const helmet = require('helmet');
const path = require('path');
const http = require('http');
const https = require('https');
const fs = require('fs');
const url = require('url');
const WebSocket = require('ws');
const appconfig = require('./appconfig.json');
const helper = require('./app/common/helper');

person Shikah    schedule 09.08.2019    source источник
comment
попробуйте установить npm внутри корневой папки   -  person iam batman    schedule 09.08.2019
comment
Большое спасибо, это устранило ошибку, но я получил другую ошибку, я не могу ее решить. (ложные 'ssl-certs' / home / shikah / fabric / blockchain-explorer / ssl-certs ' Ошибка ›››››››››››››››››››››› {Ошибка: не удается найти модуль «ткань-сеть» ....)   -  person Shikah    schedule 09.08.2019


Ответы (1)


Следуйте последним руководствам отсюда: https://github.com/hyperledger/blockchain-explorer

./main.sh install
--to install, run tests, and build project

./main.sh clean
--to clean the /node_modules, client/node_modules client/build, client/coverage, app/test/node_modules directories

./main.sh test
--to test REST API, and UI components
--to generate code coverage report

В вашем случае сначала запустите ./main.sh clean, затем ./main.sh install

Надеюсь, это будет решено

person sharif2008    schedule 03.10.2019