Skip to content

Unhelpful "cant_convert" error pointing to environment variable block #18563

Closed

Description

@Bahex

Tip

Moved from #18528 for better tracking.

Experiencing similar error when nushell is trying to read env:

Error: nu::shell::cant_convert

  × Can't convert to int.
   ╭─[Host Environment Variables:1:1]
 1 │ "ACSetupSvcPort"="23210"
   · ▲
   · ╰── can't convert string to int
 2 │ "ACSvcPort"="17532"
   ╰────

This error happens when I updated from 0.113.0 to 0.114.0 in Win11.

Originally posted by @rorric in #18528

same here with linux. updated to 0.114.0 and now after every command (ls, ...) i get

Error: nu::shell::cant_convert

  × Can't convert to int.
   ╭─[Host Environment Variables:1:1]
 1 │ "BINARYEN_ROOT"="/usr"
   · ▲
   · ╰── can't convert string to int
 2 │ "BROWSER"="firefox"
   ╰────

Error: nu::shell::cant_convert

  × Can't convert to int.
   ╭─[Host Environment Variables:1:1]
 1 │ "BINARYEN_ROOT"="/usr"
   · ▲
   · ╰── can't convert string to int
 2 │ "BROWSER"="firefox"
   ╰────

Error: nu::shell::cant_convert

  × Can't convert to int.
   ╭─[Host Environment Variables:1:1]
 1 │ "BINARYEN_ROOT"="/usr"
   · ▲
   · ╰── can't convert string to int
 2 │ "BROWSER"="firefox"
   ╰────

i have to put this on top of my config.nu

if $env.NU_EXPERIMENTAL_OPTIONS? != "enforce-runtime-annotations=false" {
    $env.NU_EXPERIMENTAL_OPTIONS = "enforce-runtime-annotations=false"
    exec $nu.current-exe
}

Originally posted by @ulrichSchreiner in #18528

Activity

  1. added theissue type on Jul 10, 2026
  2. added
    A:error-unhelpful
    A:type-system
    on Jul 10, 2026
  3. linked a pull request that will close this issuefix: assigment errors point to the assigment #18531on Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:error-unhelpfulA:type-system

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions