midjourney-api
midjourney-api copied to clipboard
Can't use with Nuxtjs
the code that reproduces this issue or a replay of the bug
let _midjourneyClient = new Midjourney({ ServerId: process.env.SERVER_ID, ChannelId: process.env.CHANNEL_ID, SalaiToken: process.env.SALAI_TOKEN, HuggingFaceToken: process.env.HUGGINGFACE_TOKEN, Debug: true, Ws: true, });
Describe the bug
let _midjourneyClient = new Midjourney({ ServerId: process.env.SERVER_ID, ChannelId: process.env.CHANNEL_ID, SalaiToken: process.env.SALAI_TOKEN, HuggingFaceToken: process.env.HUGGINGFACE_TOKEN, Debug: true, Ws: true, });
error log
ERROR in ./node_modules/midjourney/libs/midjourney.message.js
Module parse failed: Unexpected token (8:16) friendly-errors 14:37:02 You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | const utls_1 = require("./utls"); | class MidjourneyMessage {
magApiQueue = (0, queue_1.CreateQueue)(1);
| config; | constructor(defaults) { friendly-errors 14:37:02 @ ./node_modules/midjourney/libs/index.js 5:21-52 @ ./repositories/midjourney/index.js @ ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/ai-generator.vue?vue&type=script&lang=js& @ ./pages/ai-generator.vue?vue&type=script&lang=js& @ ./pages/ai-generator.vue @ ./.nuxt/router.js @ ./.nuxt/index.js @ ./.nuxt/client.js @ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js