Xo is experimental. The source code is not public yet; it will be soon. Read the release notes
Menu · XO0602

Docs

XO0602: import path does not yield a valid local name

error · reported by the checker

An import binds its last path segment as the local name, with - replaced by _. For a Go package the local name is the Go package name. If the result is still not a valid identifier, or is a keyword, give the import a name with as. See core 4.1.

Example

// main/main.xo, with a module directory 03-lib
use example.com/app/03-lib

fn f() -> Int { 1 }

Fix

use example.com/app/03-lib as lib

fn f() -> Int { lib.one() }

Run xo explain XO0602 for this text in a terminal, or see section 10.6 of the specification.