#undefined trim

1 messages · Page 1 of 1 (latest)

undone hazel
#

well i have installed the openclaw in the aws ec2 using the cmd

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --verbose

and then selected openai and placed my key and then it has asked for channel i have selected skip for now and then im getting this error

TypeError: Cannot read properties of undefined (reading 'trim')

whats the issue and what i need to do

untold lakeBOT
#

First, what version are you on?

openclaw --version

This looks like a known onboarding bug, not a bad OpenAI key. It can happen around the channel setup step when you choose skip for now.

Try this:

openclaw doctor
openclaw onboard --skip-channels
openclaw status --all

A few useful bits:

#

and I’ll help you narrow it down.

undone hazel
#

openclaw --version
openclaw: command not found

now getting this

sudo openclaw --version
sudo: openclaw: command not found

untold lakeBOT
#

Yep, that’s a different issue now.

The trim error is likely the onboarding bug.
openclaw: command not found means the CLI is probably installed but not on your PATH.

Try this, without sudo:

node -v
npm prefix -g
echo "$PATH"
export PATH="$(npm prefix -g)/bin:$PATH"
hash -r
openclaw --version

Why this happens:

#
  • the installer usually puts openclaw in your user npm bin
  • sudo won’t help if that bin dir isn’t in PATH

If it still says command not found, run these and paste the output:

npm list -g --depth=0 openclaw
ls -l "$(npm prefix -g)/bin/openclaw"

If that works, make PATH permanent:

echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc