Errors when I follow the UploadThing docs for "Vue with Nuxt"

I am trying to use UploadThing with my Nuxt project and am getting errors when I launch my app. Errors in the logs when I run the Nuxt app:
timestamp=2024-09-19T22:59:33.226Z level=ERROR fiber=#11 message="Invalid log level" error="{
\"_op\": \"InvalidData\",
\"path\": [
\"logLevel\"
],
\"message\": \"Expected a log level but received \"
}"

ERROR [nuxt] [request error] [unhandled] [500] Invalid server configuration
at ./node_modules/.pnpm/[email protected][email protected]/node_modules/uploadthing/h3/index.js:176:287
at cause (./node_modules/.pnpm/[email protected]/node_modules/effect/src/internal/core.ts:632:41)

timestamp=2024-09-19T22:59:33.285Z level=ERROR fiber=#23 message="Invalid log level" error="{
\"_op\": \"InvalidData\",
\"path\": [
\"logLevel\"
],
\"message\": \"Expected a log level but received \"
}"

ERROR [nuxt] [request error] [unhandled] [500] Invalid server configuration
at ./node_modules/.pnpm/[email protected][email protected]/node_modules/uploadthing/h3/index.js:176:287
at cause (./node_modules/.pnpm/[email protected]/node_modules/effect/src/internal/core.ts:632:41)
timestamp=2024-09-19T22:59:33.226Z level=ERROR fiber=#11 message="Invalid log level" error="{
\"_op\": \"InvalidData\",
\"path\": [
\"logLevel\"
],
\"message\": \"Expected a log level but received \"
}"

ERROR [nuxt] [request error] [unhandled] [500] Invalid server configuration
at ./node_modules/.pnpm/[email protected][email protected]/node_modules/uploadthing/h3/index.js:176:287
at cause (./node_modules/.pnpm/[email protected]/node_modules/effect/src/internal/core.ts:632:41)

timestamp=2024-09-19T22:59:33.285Z level=ERROR fiber=#23 message="Invalid log level" error="{
\"_op\": \"InvalidData\",
\"path\": [
\"logLevel\"
],
\"message\": \"Expected a log level but received \"
}"

ERROR [nuxt] [request error] [unhandled] [500] Invalid server configuration
at ./node_modules/.pnpm/[email protected][email protected]/node_modules/uploadthing/h3/index.js:176:287
at cause (./node_modules/.pnpm/[email protected]/node_modules/effect/src/internal/core.ts:632:41)
Project info: * I created a brand new Nuxt app pnpm dlx nuxi init uploadthing-play * Followed the steps from the documentation https://docs.uploadthing.com/getting-started/nuxt * I then ran the app and received those errors. I should also say, I was able to successfully run the app before adding UploadThing. I hope this is the right channel to post this but I'd love to use UploadThing for the project I working on. Any help with this? Thanks!
Solution:
```export default defineNuxtConfig({ devtools: { enabled: true }, modules: ["@uploadthing/nuxt"], compatibilityDate: "2024-07-26", + uploadthing: {...
Jump to solution
5 Replies
Brian Coleman
Brian ColemanOP3mo ago
Here is a repo of the app that generates the errors: https://github.com/brianacdev/uploadthing-nuxt-error
GitHub
GitHub - brianacdev/uploadthing-nuxt-error: A simple Nuxt app used ...
A simple Nuxt app used to recreate the errors I am having with UploadThing inside of a Nuxt app - brianacdev/uploadthing-nuxt-error
markr
markr3mo ago
Looks like you need to set a log level, i thought we had noted that in the docs, but will check
Solution
markr
markr3mo ago
export default defineNuxtConfig({
devtools: { enabled: true },
modules: ["@uploadthing/nuxt"],
compatibilityDate: "2024-07-26",
+ uploadthing: {
+ logLevel: "info",
+ },
});
export default defineNuxtConfig({
devtools: { enabled: true },
modules: ["@uploadthing/nuxt"],
compatibilityDate: "2024-07-26",
+ uploadthing: {
+ logLevel: "info",
+ },
});
markr
markr3mo ago
Seems like there may have been a regression.
Brian Coleman
Brian ColemanOP3mo ago
That did it! Thanks!
Want results from more Discord servers?
Add your server