TheHive-Project / Cortex

Cortex: a Powerful Observable Analysis and Active Response Engine
https://thehive-project.org
GNU Affero General Public License v3.0
1.28k stars 218 forks source link

Frontend build issue #408

Closed dream91 closed 1 year ago

dream91 commented 2 years ago

Build Error

Request Type

Bug

Work Environment

Question Answer
OS version (server) CentOS
OS version (client) 7
Cortex version / git hash 3.x - Tested on 3.1.1 and 3.1.4
Package Type From source

Problem Description

Build is not possible due to node_module node-sass error.

Tested on node 12 and 14.

Steps to Reproduce

  1. Clone git Cortex project
  2. Run ./sbt clean stage

Possible Solutions

Change node-sass package to sass (like here) Change sass-loader to newer version (working on 7.2.0).

Complementary information

First error

[info]  [494] ./src/assets/styles/sass/index.scss 1.12 kB {0} [built] [failed] [1 error]
[info]     + 480 hidden modules
[info] ERROR in /opt/Cortex/www/node_modules/extract-text-webpack-plugin/loader.js??ref--3-0!/opt/Cortex/www/node_modules/style-loader/index.js!/opt/Cortex/www/node_modules/css-loader/index.js?root=/opt/Cortex/www/src&sourceMap!/opt/Cortex/www/node_modules/postcss-loader/index.js!/opt/Cortex/www/node_modules/sass-loader/index.js?outputStyle=expanded&sourceMap=true&sourceMapContents=true!/opt/Cortex/www/src/assets/styles/sass/index.scss doesn't export content
[info] ERROR in ./src/assets/styles/sass/index.scss

On the end:

[error] npm ERR! code ELIFECYCLE
[error] npm ERR! errno 2
[error] npm ERR! cortex@3.1.3 build: `cross-env NODE_ENV=production webpack -p --colors`
[error] npm ERR! Exit status 2
[error] npm ERR!
[error] npm ERR! Failed at the cortex@3.1.3 build script.
[error] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[error] npm ERR! A complete log of this run can be found in:
[error] npm ERR!     /root/.npm/_logs/2022-04-05T11_42_13_721Z-debug.log

Jars were created but when I try to open Cortex page then I see error

A client error occurred on GET /index.html : Resource not found by Assets controller
dream91 commented 1 year ago

Fixed in other way here https://github.com/TheHive-Project/Cortex/issues/419