ClusterLabs / pcs-web-ui

Web interface for pcs
GNU General Public License v2.0
11 stars 5 forks source link

Can't build on Ubuntu? #79

Open mike776 opened 2 days ago

mike776 commented 2 days ago

I tried to follow the instructions, using init with make init NEXUS_REPO=false but when I run the make build afterwards I get errors, and I can't proceed.

ls: cannot access '/home/ubuntu/uibuild/pcs-web-ui/build/static/css/main.*.css': No such file or directory
node:internal/modules/cjs/loader:1137
  throw err;
  ^

Error: Cannot find module 'csso'
Require stack:
- /home/ubuntu/uibuild/pcs-web-ui/packages/app/.bin/minify-css.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
    at Module._load (node:internal/modules/cjs/loader:975:27)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/home/ubuntu/uibuild/pcs-web-ui/packages/app/.bin/minify-css.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/ubuntu/uibuild/pcs-web-ui/packages/app/.bin/minify-css.js' ]
}

Node.js v18.19.1
Assets compiled.
ls: cannot access '/home/ubuntu/uibuild/pcs-web-ui/build/static/css/main.*.css': No such file or directory
ls: cannot access '/home/ubuntu/uibuild/pcs-web-ui/build/static/js/main.*.js': No such file or directory
Compiled assets injected to html page.
Adapting for standalone usage.
rm: cannot remove '/home/ubuntu/uibuild/pcs-web-ui/build/static/js/adapterCockpit.js': No such file or directory
Adapted for environment
Prefixed asset paths: '/ui'.

Environment adapter minimized
Marks prepared
rm: cannot remove '/home/ubuntu/uibuild/pcs-web-ui/packages/app/node_modules': No such file or directory

/home/ubuntu/uibuild/pcs-web-ui/build/static/js/adapter.js: 1109

Please advise. I don't know what a nexus repo certificate is.

idevat commented 2 days ago

Hi Mike,

Regarding nexus: It is just a mirror of the npm repository (requiring certificate for access). It only serves to reduce the load on npmjs.org. With NEXUS_REPO=false you just install npm packages directly from npmjs.org. You don't need to deal with nexus. Moreover, the command make init is not necessary when you don't plan to contribute.

Regarding error you've got: Unfortunately, I cannot reproduce it. Which version do you have - is it branch main? This are the minimal steps to create the build:

$ git clone git@github.com:ClusterLabs/pcs-web-ui.git
$ cd pcs-web-ui
$ make build

Can you try just this (in some clean temporary directory) and if it fails, send me the full console log? Thanks!