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

Vue Dependency Error when running "python3 server.py --insecure --build" #2886

Open
0zk3y opened this issue Feb 17, 2024 · 13 comments
Open

Vue Dependency Error when running "python3 server.py --insecure --build" #2886

0zk3y opened this issue Feb 17, 2024 · 13 comments
Assignees
Labels

Comments

@0zk3y
Copy link

0zk3y commented Feb 17, 2024

Describe the bug
Getting error as below of vue:

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 "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/ubuntu/caldera/plugins/magma/node_modules/@vitejs/plugin-vue/dist/index.js:3955:11)
    at Object.buildStart (/home/ubuntu/caldera/plugins/magma/node_modules/@vitejs/plugin-vue/dist/index.js:4686:46)
    at /home/ubuntu/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:22834:37
    at async Promise.all (index 4)
    at async /home/ubuntu/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:23622:13
    at async catchUnfinishedHookActions (/home/ubuntu/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:23132:20)
    at async rollupInternal (/home/ubuntu/caldera/plugins/magma/node_modules/rollup/dist/shared/rollup.js:23620:5)
    at async doBuild (/home/ubuntu/caldera/plugins/magma/node_modules/vite/dist/node/chunks/dep-689425f3.js:41710:24)
    at async build (/home/ubuntu/caldera/plugins/magma/node_modules/vite/dist/node/chunks/dep-689425f3.js:41552:16)
    at async CAC.<anonymous> (/home/ubuntu/caldera/plugins/magma/node_modules/vite/dist/node/cli.js:738:9)
Traceback (most recent call last):
  File "/home/ubuntu/caldera/server.py", line 249, in <module>
    subprocess.run(["npm", "run", "build"], cwd="plugins/magma", check=True)
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['npm', 'run', 'build']' returned non-zero exit status 1.
image

I have just followed the steps as mentioned in Concise installation steps.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
Copy link

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/

@The-Reap-er
Copy link

i have the Same problem too on v5

@infosecconsultant
Copy link

It's missing the 'npm' package.
Try:
sudo apt install npm

@0zk3y
Copy link
Author

0zk3y commented Feb 20, 2024

It's missing the 'npm' package. Try: sudo apt install npm

NPM is already installed

image

@plue0709
Copy link

image
Same !!!
2 weeks ago i could run caldera but now i couldn't :(

@plue0709
Copy link

I fixed the problem. So, i use this way to fix the problem

sudo apt-get update

pip3 uninstall pyopenssl

pip3 install pyopenssl==22.0.0

pip3 uninstall cryptography

pip3 install cryptography==37.0.0

also required the newest version of npm

@elegantmoose
Copy link
Contributor

So with using dockerfile, you needed to down version cryptography and install pyopenssl?

@plue0709
Copy link

plue0709 commented Feb 21, 2024

yes, but so many bug with version 5.0.0. When i downed the version of cryptography and pyopenssl i can run the server but the web-server didn'tresponse when i login
So i just use version 4.2.0

@0zk3y
Copy link
Author

0zk3y commented Feb 21, 2024

I fixed the problem. So, i use this way to fix the problem

sudo apt-get update

pip3 uninstall pyopenssl

pip3 install pyopenssl==22.0.0

pip3 uninstall cryptography

pip3 install cryptography==37.0.0

also required the newest version of npm

Tried using the same thing but still getting the same error, I don't believe it is something related to any python dependencies believe its something from node which is missing

image

@plue0709
Copy link

you should use version 4.2.0

@0zk3y
Copy link
Author

0zk3y commented Mar 15, 2024

Any update on Fixes?

@younggod69
Copy link

Hello! Try to install NodeJS v16 or later. This solved the issue for me.
If it's not working, try to install NodeJS before npm.

source: https://caldera.readthedocs.io/en/latest/Installing-Caldera.html

@ZeKay
Copy link

ZeKay commented Apr 17, 2024

for me, none of the above workarounds yielded anything, npm nodejs or unisntalling python ssl libraries. I then reinstalled 4.2.0

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

7 participants