# AUR0021

### **Error message**

Invalid module transform input: yyyy. Expected Promise or Object.

### **Parameters**

Input value (any)

### Error explanation

This error occurs when a module loader or transformer receives an input that is neither a Promise nor an Object. The module loader expects to work with either a module object or a Promise that resolves to a module, and will throw this error if given an invalid type (such as a string, number, or null).

### Common causes

* Passing a primitive value (string, number, boolean, etc.) instead of a module or Promise to a module loader or transformer.
* Accidentally passing `null` or `undefined` as the input.
* Misconfigured dynamic import or require call.

### How to fix

* Ensure you are passing either a module object or a Promise that resolves to a module.
* Check the value being passed to the module loader or transformer for typos or incorrect types.
* If using dynamic imports, verify that the import or require call returns a Promise or module object.

### Debugging tips

* Check the stack trace to see where the invalid input was provided.
* Add logging or breakpoints to inspect the value being passed to the module loader or transformer.
* Review the code that constructs or imports modules to ensure correct types are used.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aurelia.io/developer-guides/error-messages/0001-to-0023/aur0021.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
