Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Default condition should be last one #5

Open
ayanokoujifl opened this issue Nov 19, 2023 · 2 comments
Open

Module not found: Default condition should be last one #5

ayanokoujifl opened this issue Nov 19, 2023 · 2 comments

Comments

@ayanokoujifl
Copy link

Module not found: Default condition should be last one

I get this error when i'm try to import { GenerationStyle, client, Status } from "imaginesdk"

This code:

    
import { GenerationStyle, client, Status } from "imaginesdk"
const imagine = client("API_KEY")

export const generateImage = async (prompt: string) => {
const response = await imagine.generations(prompt, {
style: GenerationStyle.ANIME,
})
if (response.status() === Status.OK) {
const image = response.getOrThrow()
image.asFile("output.png")
} else {
console.log(response.errorOrThrow())
}
}

I'm using NextJS, React ^18

This is the example code from the documentation, and the module was correctly imported, I need help, please.

@ayanokoujifl
Copy link
Author

The error is on import {client}, how to solve?

@unobrandon
Copy link

I get the same error on import {client}. How to solve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants