socprime / soc_workflow_app_ce

SOC Workflow App helps Security Analysts and Threat Hunters explore suspicious events, look into raw events arriving at the Elastic Stack, and view Saved Searches configured by teammates.
https://my.socprime.com/soc-workflow-app/
Other
92 stars 26 forks source link

Installation failed - Cannot find module "deepmerge" #2

Closed thisisunreal closed 5 years ago

thisisunreal commented 5 years ago

Hi,

I'm performing installation and I've updated the version but I receive the following error.

Plugin installation was unsuccessful due to error "Command failed: /usr/share/kibana/node/bin/node /usr/share/kibana/src/cli --env.name=production --optimize.useBundleCache=false --server.autoListen=false --plugins.initialize=false --uiSettings.enabled=false
(node:3214) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
FATAL { Error: Cannot find module 'deepmerge'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/share/kibana/plugins/soc_workflow_ce/server/helpers/common/prepare_data_actions.js:1:15)
    at Module._compile (module.js:652:30)
    at loader (/usr/share/kibana/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/usr/share/kibana/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/share/kibana/plugins/soc_workflow_ce/server/routes/alert/one-entity.js:4:28)
    at Module._compile (module.js:652:30)
    at loader (/usr/share/kibana/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/usr/share/kibana/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18) code: 'MODULE_NOT_FOUND' }

Can anyone help with this?

fyodorr commented 5 years ago

I experienced the same problems as you. After some troubleshooting I realized that they didn't build the complete package. You can solve this issue as described below:

  1. Extract the zip file (/dist/soc_workflow_app_nnnn.zip)
  2. If needed change Kibana version i package.json
  3. Build npm dependencies in package.json with "npm install". That will build the dependencies in node_modules which is required for the installation.
  4. zip the file "zip -r soc_workflow_ce-1.6.3.zip kibana/"
  5. Install as the guide suggests
socprime commented 5 years ago

Thank you for your report! We have already fixed the archive /dist/soc_workflow_app_XXXX.zip now there all Node.js modules are included. As for kibana version, kibana doesn’t allow to define some mask for version definition, we specified version 6.3.0 because in the time when we uploaded app it was the latest tested version. But you should take into consideration that for the newest version of kibana there are some bugs which we already working with but update to github repo will be in the beginning of 2019.