Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ability to deploy version 5.0 #2996

Closed
redl1k opened this issue Jun 5, 2024 · 6 comments
Closed

The ability to deploy version 5.0 #2996

redl1k opened this issue Jun 5, 2024 · 6 comments
Assignees
Labels

Comments

@redl1k
Copy link

redl1k commented Jun 5, 2024

Hi everyone. Encountered a problem with deploying “Caldera” version 5.0. After reading other Issue to this project and realized that version 5.0 has a number of issues that do not allow to deploy this version.

Tried to deploy version 4.2, there were no problems with it and everything works.

And a question for the community. Are there any fixes for the problems that will help deploy version 5.0? Or should I wait for a official bug fix?

One of the problems with deploying “Caldera v5.0” is running a python server that cannot start and crashes with the following error... attached log

$>python3 server.py --build
2024-06-05 09:49:46 INFO     Using main config from conf/local.yml                                                                                                                               server.py:236
2024-06-05 09:49:47 INFO     Setting VueJS environment file.                                                                                                                                     server.py:151
                    INFO     Building VueJS front-end.                                                                                                                                           server.py:274

up to date, audited 770 packages in 2s

100 packages are looking for funding
  run `npm fund` for details

11 vulnerabilities (7 moderate, 3 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

> magma@0.0.0 build
> node prebundle.js && vite build

Copying all plugin GUI source files to magma
Copying over "access" files...
Copying over "atomic" files...
Copying over "builder" files...
Copying over "compass" files...
Copying over "debrief" files...
Copying over "emu" files...
Copying over "gameboard" files...
Copying over "human" files...
Copying over "manx" files...
Copying over "response" files...
Copying over "sandcat" files...
Copying over "ssl" files...
Copying over "stockpile" files...
Copying over "stockpile11111" files...
Copying over "training" files...
Plugin GUI source files copied!
vite v2.9.15 building for production...
✓ 0 modules transformed.
[vite:vue] Failed to resolve vue/compiler-sfc.
@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.
error during build:
Error: Failed to resolve vue/compiler-sfc.
@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.
    at resolveCompiler (/home/user/Desktop/caldera/plugins/magma/node_modules/@vitejs/plugin-vue/dist/index.js:3955:11)
    at Object.buildStart (/home/user/Desktop/caldera/plugins/magma/node_modules/@vitejs/plugin-vue/dist/index.js:4686:46)
    at /home/user/Desktop/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:22834:37
    at async Promise.all (index 4)
    at async /home/user/Desktop/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:23622:13
    at async catchUnfinishedHookActions (/home/user/Desktop/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:23132:20)
    at async rollupInternal (/home/user/Desktop/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:23620:5)
    at async doBuild (/home/user/Desktop/caldera/plugins/magma/node_modules/vite/dist/node/chunks/dep-689425f3.js:41710:24)
    at async build (/home/user/Desktop/caldera/plugins/magma/node_modules/vite/dist/node/chunks/dep-689425f3.js:41552:16)
    at async CAC.<anonymous> (/home/user/Desktop/caldera/plugins/magma/node_modules/vite/dist/node/cli.js:738:9)
npm ERR! code 1
npm ERR! path /home/user/Desktop/caldera/plugins/magma
npm ERR! command failed
npm ERR! command sh -c node prebundle.js && vite build

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-06-05T13_49_50_512Z-debug.log
Traceback (most recent call last):
  File "/home/user/Desktop/caldera/server.py", line 276, in <module>
    subprocess.run(["npm", "run", "build"], cwd=MAGMA_PATH, check=True)
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['npm', 'run', 'build']' returned non-zero exit status 1.
@redl1k redl1k added the question label Jun 5, 2024
Copy link

github-actions bot commented Jun 5, 2024

Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/

@jbaptperez
Copy link
Contributor

jbaptperez commented Jun 5, 2024

I already had this issue when trying to use Ubuntu 22.04 LTS as base image in the Dockerfile instead of Ubuntu 23.04.

The reason is npm/node version are too old (npm cannot properly read the package.json file).
You need to upgrade the npm/node versions you use (e.g. using nvm and updating your PATH to the new version).

In README.md, it is written:

  • NodeJS (v16+ recommended)

@redl1k
Copy link
Author

redl1k commented Jun 5, 2024

Strange, I updated nodejs but the system didn't want to accept it....... I had to completely reinstall NodeJS to the correct version and the script to deploy ‘Caldera’ ran, thanks for the tip :)

But at the moment I'm facing the same problem as in the previous Issue. Namely, it is impossible to log into the platform. And at this point I guess we need to wait for an official bug fix?

@elegantmoose
Copy link
Contributor

We thought we fixed it. On the queue to review again. Apologies the inconvenience.

@elegantmoose elegantmoose self-assigned this Jun 5, 2024
@jbaptperez
Copy link
Contributor

@redl1k, You can apply the workaround detailed here, expecting a fix (issue #2984).

@redl1k
Copy link
Author

redl1k commented Jun 6, 2024

@jbaptperez Thanks for the reply. the solution helped :)

@redl1k redl1k closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants