Uncaught TypeError: (0 , util_1.promisify) is not a function at node_modules/text-to-image/dist/textToImage.js
Closed this issue · 1 comments
Heesel commented
Version of the library
5.2.0
Describe the bug
When I submit my form and try to create an image with sample text, I get this error.
code
<template>
<div>
<form method="post" @submit.prevent="handleSubmit">
<button type="submit">submit</button>
</form>
</div>
</template>
<script>
import { ref, onMounted } from 'vue';
import { generate } from 'text-to-image'
import axios from 'axios';
export default {
setup() {
const handleSubmit = async() => {
const tabbedText = await generate(
'\tDonec id elit non mi porta gravida at eget metus. \n\tSed posuere consectetur est at lobortis.',
{});
console.log(tabbedText);
console.log('aaaa');
}
return { handleSubmit }
}
}
To Reproduce
Unfortunately, I can't seem to reproduce this
Expected behavior
I expected that it would generate an uri for me that I can use
Additional context
I am using Nuxt 3 if that's important
bostrom commented
Hi @Heesel, could you try to install the beta version 6 available as text-to-image@beta
? In this version the file writing feature has been moved to an extension, so shouldn't be an issue in browser environments.
Please check the README for the beta version for more information about extensions.