Hubs-Foundation / hubs-compose

Local development setup for Hubs
Mozilla Public License 2.0
45 stars 38 forks source link

error while executing ./bin/init #24

Closed hassanayoub1985 closed 1 year ago

hassanayoub1985 commented 1 year ago

Hi,

Initializing Dialog

[+] Running 2/2 ⠿ Container hubs-compose-mutagen-1 Recreated 0.4s ⠿ Mutagen Terminated 0.4s [+] Running 2/2 ⠿ Container hubs-compose-mutagen-1 Healthy 3.4s ⠿ Mutagen Started 2.4s npm ERR! Cannot read property '@sitespeed.io/throttle' of undefined

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-01-05T13_34_49_590Z-debug.log [+] Running 4/4 ⠿ Container hubs-compose-db-1 Removed 0.2s ⠿ Container hubs-compose-mutagen-1 Removed 0.4s ⠿ Mutagen Terminated 0.4s ⠿ Network mozilla-hubs Removed

Tz-H commented 1 year ago

I fixed it by updating bin/init file to add npm cache clear --force before calling npm ci for Dialog:

#======HERE
echo -e ${prefix}Initializing Dialog$suffix &&
mutagen-compose -f "$composefile" run --rm dialog sh -c '[ -d "node_modules" ] || npm cache clear --force || npm ci' && 
fsoft72 commented 1 year ago

The @Tz-H fix worked for me too

I fixed it by updating bin/init file to add npm cache clear --force before calling npm ci for Dialog:

#======HERE
echo -e ${prefix}Initializing Dialog$suffix &&
mutagen-compose -f "$composefile" run --rm dialog sh -c '[ -d "node_modules" ] || npm cache clear --force || npm ci' && 
bryanenders commented 1 year ago

Was this error encountered the first time running bin/init or during a subsequent run?

giangduong commented 1 year ago

I got the same issue. Apply Tz-H solution will fix the bin/init execution but when i run bin/up, i do not see following containers up and running:

  1. Dialog
  2. hubs client
  3. hub admin
image

I got this error message when go to https://hubs.local:4000/

"Missing file admin.html. Please try again."

bryanenders commented 1 year ago

Unfortunately this solution doesn’t do what you likely think it does. The double pipe in npm cache clear --force || has the effect of skipping the npm ci call altogether! The root cause of the issue appears to have been an update to Dialog which added a Python dependency. A fix is forthcoming.