Discovering Ziti and trying to install it by following the Quickstart installation but I'm facing issues. Please see below:
root@zti:/home/eric# git clone GitHub - openziti/ziti-console "${ZITI_HOME}/ziti-console"
Clonage dans '/opt/ziti/ziti-console'...
remote: Enumerating objects: 4479, done.
remote: Counting objects: 100% (1768/1768), done.
remote: Compressing objects: 100% (727/727), done.
remote: Total 4479 (delta 1201), reused 1433 (delta 1018), pack-reused 2711
Réception d'objets: 100% (4479/4479), 14.80 Mio | 30.62 Mio/s, fait.
Résolution des deltas: 100% (2728/2728), fait.
root@zti:/home/eric# cd "${ZITI_HOME}/ziti-console"
npm install
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /opt/ziti/ziti-console/dist/ziti-console-lib/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/opt/ziti/ziti-console/dist/ziti-console-lib/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-02-26T12_03_16_476Z-debug-0.log
I'm not a Linux specialist but I spent many hours trying to solve my problem without success. What I see is that "dist" directory does not exist in ziti-console directory. Any idea would be greatly appreciated!
Hi @Eric. Welcome to the community and to OpenZiti!
It looks to me like your angular build step didn't succeed. You got this error simply by running npm install? I just ran it on my test machine and it worked fine. Are you sure you have node 16+ installed and angular installed?
I'll try on a new docker image to see if I can replicate your issue. Right now, it must be something environmental. Also, what linux variant are you using?
I made a brand new ubuntu container, apt updated it, installed all the dependencies etc and the steps outlined on the documentation worked fine for me, sadly. I even made sure the version of node was < 16 to see if that was the issue but I can't seem to reproduce the problem...
I would say "start over" and see what happens. You've probably done that already... If not, can you start a clean terminal, ensure ZITI_HOME is set appropriately (/opt/ziti/ in your case) delete the pre-existing ziti-console directory and run through all the steps again?
I've never seen npm install report this. I dunno what might be the problem.
Thanks four quick reply. I'm installing on a fresh Debian 12 system. I followed all the steps. Here are the versions:
root@zti:/home/eric# node -v
v18.19.0
root@zti:/home/eric# ng version
Global setting: disabled
Local setting: No local workspace configuration file.
Effective status: disabled
ZITI_HOME is ok and yes, as you supposed, I tried multiple times.
When I launch npm doctor, I see:
Check Value Recommendation/Notes
npm ping ok
npm -v not ok Use npm v10.4.0
node -v not ok Use node v20.11.1 (current: v18.19.0)
npm config get registry ok using default registry (https://registry.npmjs.org/)
git executable in PATH ok /usr/bin/git
global bin folder in PATH ok /usr/local/bin
Perms check on cached files ok
Perms check on local node_modules ok
Perms check on global node_modules ok
Perms check on local bin folder ok
Perms check on global bin folder ok
Verify cache contents ok verified 1265 tarballs
npm ERR! Some problems found. See above for recommendations.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-02-26T13_21_03_511Z-debug-0.log
I just launched a Debian 12.5 container using docker run -it --rm debian:12.5 bash, installed the dependencies, and installed OpenZiti using the quickstart script:
then ran through all the instructions... it seems to work for me on debian 12 too.
Maybe the /opt/ziti folder is owned by root or something strange is happening? Can you try using your $HOME folder to eliminate any strange permission issues? (this is only a guess, I can't reproduce your problem still unfortunately)
Please ignore my previous reply, I was assuming this was being being built/run locally (ie. not via docker). It does seem there may be some kind of issue creating that /dist folder which holds the application bundles. Could be permissions related but I'm not yet able to to reproduce myself. Will keep trying and see if I have any luck.
I don't use docker and I am the owner of /opt/ziti folder. So I don't see why I should get permissions issue. I'm currently trying to do another installation in English in case the issue was due to French language.
Ahh ok sorry for the misunderstanding. So in that case it sounds like you may be missing a couple steps after the npm install. Have you run these two commands and/or see any errors when running them?
ng build ziti-console-lib ng build ziti-console-node
I apologize, after re-reading your initial post I can see the issue you're facing is getting past the npm install step. So my comment above likely does not apply. That said, I'm not sure why the npm install step would be looking for resources in the project /dist folder. That I will need to take a closer look at.
we don't really tell people how to install node. I use nvm because I find it the easiest way personally and when I install node from apt it generally installs node 12 or something really old.
J'ai aussi pensé au truc anglais/français, parce que je l'ai remarqué dans votre message git... mais ce serait étrange si c'était là le problème !
If it's English/French let us that'd be shocking -- but mabye?
Admin console installed Thanks a lot for your help. I just suggest you to put the way you install nodejs and npm in the Quickstart guide because using apt-get does not work and i'm not strong enough on Linux to explain why!
FWIW -- I could replicate your problem in debian 12.5 by using apt install jq curl nodejs npm wget lsof git -y to install the dependencies needed. Really unexpected behavior!
Steps to reproduce:
docker run -it --rm debian:12.5 bash
update:
apt update
install deps needed:
apt install jq curl nodejs npm wget lsof git -y
run OpenZiti's quickstart, accept the generated password (we won't be really using it in this example):
So I think this is a node 18.19.0 vs node 18.19.1 issue somehow. I checked the nvm install method and it installs node 18.19.1 whereas apt is installing 18.19.0...
So my guess is node fixed something between 18.19.0 and 18.19.1 and you were just unlucky @Eric ... Good to know i guess