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

Cannot build #2910

Open
Petrucchio opened this issue Mar 5, 2024 · 5 comments
Open

Cannot build #2910

Petrucchio opened this issue Mar 5, 2024 · 5 comments
Assignees
Labels

Comments

@Petrucchio
Copy link

Issue Description:

When attempting to run the command python3 server.py --insecure --build, I encountered the following error:

2024-03-05 10:47:31 WARNING --insecure flag set. Caldera will use the default user accounts in default.yml config file. server.py:216
INFO Using main config from conf/default.yml server.py:225
INFO Building VueJS front-end. server.py:261
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: eslint-plugin-jinja2@0.1.0
npm ERR! Found: eslint@8.50.0
npm ERR! node_modules/eslint
npm ERR! dev eslint@"^8.50.0" from the root project
npm ERR! peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0
npm ERR! node_modules/@eslint-community/eslint-utils
npm ERR! @eslint-community/eslint-utils@"^4.2.0" from eslint@8.50.0
npm ERR! 2 more (eslint-config-airbnb-base, eslint-plugin-import)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^0.23.0 || ^1.0.0 || ^2.0.0" from eslint-plugin-jinja2@0.1.0
npm ERR! node_modules/eslint-plugin-jinja2
npm ERR! dev eslint-plugin-jinja2@"^0.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint@2.13.1
npm ERR! node_modules/eslint
npm ERR! peer eslint@"^0.23.0 || ^1.0.0 || ^2.0.0" from eslint-plugin-jinja2@0.1.0
npm ERR! node_modules/eslint-plugin-jinja2
npm ERR! dev eslint-plugin-jinja2@"^0.1.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /home/tuxo/.npm/_logs/2024-03-05T13_47_32_329Z-eresolve-report.txt

Steps to Reproduce:

Run python3 server.py --insecure --build.
Observe the error message shown above.
Expected Behavior:

The command python3 server.py --insecure --build should execute without errors and successfully build the VueJS front-end.

Additional Information:

Operating System: Ubuntu 22.04.4 LTS
Node.js Version: v21.6.2
Python Version: pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

Copy link

github-actions bot commented Mar 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/

@elegantmoose
Copy link
Contributor

@Petrucchio Get it working?

Were you running server locally or on docker?

@elegantmoose elegantmoose self-assigned this Mar 12, 2024
@restarbuck101
Copy link

Addressing Envs Errors/ VUE To fix the errors, modify the code to update the .value property pf the ref object instead of trying to reassign the ref itself. Located in these file paths

              /caldera/plugins/builder/gui/views/builder.vue
	/caldera/plugins/magma/src/plugins/builder/views/builder.vue

Updating the envs variable should update reactive variables in Vue.js when using the Composition API.
For the builder.vue and any similar files , update the code as follows

Before:
const envs = ref();envs = await $api.get("/plugin/builder/environment");

After:
const envs = ref();envs.value = await $api.get("/plugin/builder/environment");

In the corrected code, envs.value is used to update the value of the ref, which allows you to maintain the reactivity of envs while conforming to the constraints of const.
Make sure to apply this correction to both instances where the error occurs:

	/caldera/plugins/builder/gui/views/builder.vue
	/caldera/plugins/magma/src/plugins/builder/views/builder.vue

This adjustment should resolve the build errors and allow the Vite development server to start successfully without further issues.

@restarbuck101
Copy link

This worked with me using Debian 11

@elegantmoose
Copy link
Contributor

@restarbuck101 Glad you got it working.

Did you want to open a PR in Builder to get credit for the fix?

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