# E4020

Package not found in the loaded packages.

## Erroneous Example

```{literalinclude} /sources/error_codes/4020_error/top.mbt
:language: moonbit
```

The example above tries to call the method `to_int` in a package `boolean`,
but this package is not present in the list of loaded packages,
giving the following error on line 1:

```
Package "boolean" not found in the loaded packages.
```

## Suggestion

Make sure the package name is valid.

If it is not a package in module `moonbitlang/core`, make sure that it is
mentioned as one of the imported packages in `moon.pkg.json` as well.

In the above example, call the method on `Bool` directly:

```{literalinclude} /sources/error_codes/4020_fixed/top.mbt
:language: moonbit
```
