Cortex
Cortex copied to clipboard
Frontend build issue
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
- Clone git Cortex project
- 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! [email protected] build: `cross-env NODE_ENV=production webpack -p --colors`
[error] npm ERR! Exit status 2
[error] npm ERR!
[error] npm ERR! Failed at the [email protected] 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