当我尝试通过命令 (./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');