Zack Plauché
Zack Plauché
NNuxt
Created by Zack Plauché on 3/16/2025 in #❓・help
Yarn Generate Error
Annoying error won't build on yarn generate (file::_entry)
5 replies
NNuxt
Created by Zack Plauché on 3/11/2025 in #❓・help
The argument 'filename' must be a file URL object, file URL string, or absolute path string.
C:\Users\zackp\Desktop\inevitabilityblueprintapp>yarn generate
yarn run v1.22.22
$ nuxt generate
[ nuxi 1:11:40 PM] Nuxt 3.16.0 with Nitro 2.11.6
[nuxt:tailwindcss 1:11:41 PM] ℹ Using Tailwind CSS from ~/assets/css/tailwind.css
[1:11:41 PM] ℹ Nuxt Icon server bundle mode is set to local
[ nuxi 1:11:41 PM] ℹ Building for Nitro preset: static
[1:11:43 PM] ℹ Building client...
[1:11:43 PM] ℹ vite v6.2.1 building for production...
[1:11:44 PM] ℹ ✓ 163 modules transformed.
[1:11:44 PM] ℹ .nuxt/dist/client/manifest.json 2.32 kB │ gzip: 0.46 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/default.ZQTwODgu.css 0.58 kB │ gzip: 0.35 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/error-500.dGVH929u.css 1.88 kB │ gzip: 0.72 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/index.Co0uMluk.css 2.01 kB │ gzip: 0.73 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/error-404.C3V-3Mc4.css 3.56 kB │ gzip: 1.10 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/entry.T5FjYexq.css 17.05 kB │ gzip: 3.80 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/BX6ce0-c.js 0.30 kB │ gzip: 0.22 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/DrwaXkxE.js 1.64 kB │ gzip: 0.84 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/BqI5IDWf.js 3.41 kB │ gzip: 1.54 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/BCPt861Z.js 7.71 kB │ gzip: 3.34 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/B88kN4c4.js 9.44 kB │ gzip: 3.77 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/B9SBc-hy.js 14.92 kB │ gzip: 4.71 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/BQ5rISvg.js 189.50 kB │ gzip: 72.00 kB
[1:11:44 PM] ℹ ✓ built in 1.69s
[1:11:44 PM] ✔ Client built in 1713ms
[1:11:44 PM] ℹ Building server...
[1:11:44 PM] ℹ vite v6.2.1 building SSR bundle for production...
[1:11:44 PM] ℹ ✓ 1 modules transformed.
[1:11:44 PM] ℹ .nuxt/dist/server/styles.mjs 0.07 kB
[1:11:44 PM] ℹ .nuxt/dist/server/server.mjs 0.10 kB │ map: 0.22 kB
[1:11:44 PM] ℹ ✓ built in 13ms
[1:11:44 PM] ✔ Server built in 20ms
[nitro 1:11:44 PM] ℹ Initializing prerenderer

[1:11:45 PM] WARN "file:///C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/nuxt/dist/core/runtime/nitro/utils/cache-driver.js" is imported by "virtual:#nitro-internal-virtual/storage", but could not be resolved – treating it as an external dependency.


[1:11:45 PM] ERROR The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'file:///_entry.js'

at createRequire (node:internal/modules/cjs/loader:1758:13)
at /C:/Users/zackp/Desktop/inevitabilityblueprintapp/.nuxt/prerender/chunks/_/nitro.mjs:1227:1
at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:26)
at async prerender (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/nitropack/dist/core/index.mjs:2043:44)
at async /C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/nuxt/dist/shared/nuxt.B7-cu52A.mjs:4538:5
at async build (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/nuxt/dist/shared/nuxt.B7-cu52A.mjs:7086:3)
at async Object.run (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/@nuxt/cli/dist/chunks/build.mjs:74:5)
at async Object.run (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/@nuxt/cli/dist/chunks/generate.mjs:33:5)
at async runCommand (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/citty/dist/index.mjs:316:16)



[1:11:45 PM] ERROR The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'file:///_entry.js'

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
C:\Users\zackp\Desktop\inevitabilityblueprintapp>yarn generate
yarn run v1.22.22
$ nuxt generate
[ nuxi 1:11:40 PM] Nuxt 3.16.0 with Nitro 2.11.6
[nuxt:tailwindcss 1:11:41 PM] ℹ Using Tailwind CSS from ~/assets/css/tailwind.css
[1:11:41 PM] ℹ Nuxt Icon server bundle mode is set to local
[ nuxi 1:11:41 PM] ℹ Building for Nitro preset: static
[1:11:43 PM] ℹ Building client...
[1:11:43 PM] ℹ vite v6.2.1 building for production...
[1:11:44 PM] ℹ ✓ 163 modules transformed.
[1:11:44 PM] ℹ .nuxt/dist/client/manifest.json 2.32 kB │ gzip: 0.46 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/default.ZQTwODgu.css 0.58 kB │ gzip: 0.35 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/error-500.dGVH929u.css 1.88 kB │ gzip: 0.72 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/index.Co0uMluk.css 2.01 kB │ gzip: 0.73 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/error-404.C3V-3Mc4.css 3.56 kB │ gzip: 1.10 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/entry.T5FjYexq.css 17.05 kB │ gzip: 3.80 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/BX6ce0-c.js 0.30 kB │ gzip: 0.22 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/DrwaXkxE.js 1.64 kB │ gzip: 0.84 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/BqI5IDWf.js 3.41 kB │ gzip: 1.54 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/BCPt861Z.js 7.71 kB │ gzip: 3.34 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/B88kN4c4.js 9.44 kB │ gzip: 3.77 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/B9SBc-hy.js 14.92 kB │ gzip: 4.71 kB
[1:11:44 PM] ℹ .nuxt/dist/client/_nuxt/BQ5rISvg.js 189.50 kB │ gzip: 72.00 kB
[1:11:44 PM] ℹ ✓ built in 1.69s
[1:11:44 PM] ✔ Client built in 1713ms
[1:11:44 PM] ℹ Building server...
[1:11:44 PM] ℹ vite v6.2.1 building SSR bundle for production...
[1:11:44 PM] ℹ ✓ 1 modules transformed.
[1:11:44 PM] ℹ .nuxt/dist/server/styles.mjs 0.07 kB
[1:11:44 PM] ℹ .nuxt/dist/server/server.mjs 0.10 kB │ map: 0.22 kB
[1:11:44 PM] ℹ ✓ built in 13ms
[1:11:44 PM] ✔ Server built in 20ms
[nitro 1:11:44 PM] ℹ Initializing prerenderer

[1:11:45 PM] WARN "file:///C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/nuxt/dist/core/runtime/nitro/utils/cache-driver.js" is imported by "virtual:#nitro-internal-virtual/storage", but could not be resolved – treating it as an external dependency.


[1:11:45 PM] ERROR The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'file:///_entry.js'

at createRequire (node:internal/modules/cjs/loader:1758:13)
at /C:/Users/zackp/Desktop/inevitabilityblueprintapp/.nuxt/prerender/chunks/_/nitro.mjs:1227:1
at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:26)
at async prerender (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/nitropack/dist/core/index.mjs:2043:44)
at async /C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/nuxt/dist/shared/nuxt.B7-cu52A.mjs:4538:5
at async build (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/nuxt/dist/shared/nuxt.B7-cu52A.mjs:7086:3)
at async Object.run (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/@nuxt/cli/dist/chunks/build.mjs:74:5)
at async Object.run (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/@nuxt/cli/dist/chunks/generate.mjs:33:5)
at async runCommand (/C:/Users/zackp/Desktop/inevitabilityblueprintapp/node_modules/citty/dist/index.mjs:316:16)



[1:11:45 PM] ERROR The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'file:///_entry.js'

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
5 replies
NNuxt
Created by Zack Plauché on 3/11/2025 in #❓・help
yarn create nuxt -h gives old flags?
On Windows 11, I put in the command yarn create nuxt -h and it gave me the following:
yarn create nuxt -h
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "[email protected]" with binaries:
- create-nuxt
Create a Nuxt app in seconds (create-nuxt v3.22.5)

USAGE create-nuxt [OPTIONS] [DIR]

ARGUMENTS

DIR Project directory

OPTIONS

--cwd=<directory> Specify the working directory
-t, --template Template name
-f, --force Override existing directory
--offline Force offline mode
--preferOffline Prefer offline mode
--no-install Skip installing dependencies
--gitInit Initialize git repository
--shell Start shell after installation in project directory
--packageManager Package manager choice (npm, pnpm, yarn, bun)
-M, --modules Nuxt modules to install (comma separated without spaces)


Done in 1.58s.
yarn create nuxt -h
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "[email protected]" with binaries:
- create-nuxt
Create a Nuxt app in seconds (create-nuxt v3.22.5)

USAGE create-nuxt [OPTIONS] [DIR]

ARGUMENTS

DIR Project directory

OPTIONS

--cwd=<directory> Specify the working directory
-t, --template Template name
-f, --force Override existing directory
--offline Force offline mode
--preferOffline Prefer offline mode
--no-install Skip installing dependencies
--gitInit Initialize git repository
--shell Start shell after installation in project directory
--packageManager Package manager choice (npm, pnpm, yarn, bun)
-M, --modules Nuxt modules to install (comma separated without spaces)


Done in 1.58s.
Then I ran yarn create nuxt . --packageManager yarn --gitInit false to give me:
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
- create-nuxt
(SKIPPING SOME LINES TO SAVE SPACE FOR DISCORD...)
◐ Installing dependencies... nuxi 10:30:56 AM
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447.
! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager

yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
⠁ (node:48608) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "nuxt > @nuxt/[email protected]" has unmet peer dependency "vite@>=6.0".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^6.0.0".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^6.0.0".
warning "nuxt > @nuxt/devtools > @nuxt/[email protected]" has unmet peer dependency "vite@>=6.0".
warning "nuxt > nitropack > [email protected]" has unmet peer dependency "typescript@^5.x".
warning "nuxt > @nuxt/devtools > @vue/devtools-core > [email protected]" has unmet peer dependency "vite@^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0".
warning "nuxt > @nuxt/devtools > vite-plugin-inspect > [email protected]" has unmet peer dependency "vite@^2.9.0 || ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 || ^6.0.1".
warning "nuxt > @nuxt/devtools > vite-plugin-inspect > vite-dev-rpc > [email protected]" has unmet peer dependency "vite@^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0".
[4/4] Building fresh packages...
success Saved lockfile.
$ nuxt prepare
✔ Types generated in .nuxt nuxi 10:31:26 AM
Done in 28.91s.
✔ Installation completed.
yarn create v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
- create-nuxt
(SKIPPING SOME LINES TO SAVE SPACE FOR DISCORD...)
◐ Installing dependencies... nuxi 10:30:56 AM
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447.
! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager

yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
⠁ (node:48608) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "nuxt > @nuxt/[email protected]" has unmet peer dependency "vite@>=6.0".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^6.0.0".
warning "nuxt > @nuxt/devtools > [email protected]" has unmet peer dependency "vite@^6.0.0".
warning "nuxt > @nuxt/devtools > @nuxt/[email protected]" has unmet peer dependency "vite@>=6.0".
warning "nuxt > nitropack > [email protected]" has unmet peer dependency "typescript@^5.x".
warning "nuxt > @nuxt/devtools > @vue/devtools-core > [email protected]" has unmet peer dependency "vite@^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0".
warning "nuxt > @nuxt/devtools > vite-plugin-inspect > [email protected]" has unmet peer dependency "vite@^2.9.0 || ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 || ^6.0.1".
warning "nuxt > @nuxt/devtools > vite-plugin-inspect > vite-dev-rpc > [email protected]" has unmet peer dependency "vite@^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0".
[4/4] Building fresh packages...
success Saved lockfile.
$ nuxt prepare
✔ Types generated in .nuxt nuxi 10:31:26 AM
Done in 28.91s.
✔ Installation completed.
Mainly: ! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447. Why does it say it doesn't define a package manager field if I did? Also, I keep getting a punycode error but I'm not sure what that is.
5 replies
NNuxt
Created by Zack Plauché on 8/23/2024 in #❓・help
Might be a Tailwind question, but... somehow my Google Fonts are working without adding any <link>s
I have the @nuxtjs/tailwindcss plugin on my nuxt 3 project. I normally add fonts via Google Fonts by getting the links and installing them. I have tailwind typography added as well. However, I don't see anything in the Tailwind docs saying that the fonts are included. I also don't see any Google fonts in the links / script tags. How could this be? Works in both Chromium and Firefox
2 replies
NNuxt
Created by Zack Plauché on 8/1/2024 in #❓・help
Init new Nuxt project without "Initialize git repository" check?
Is there a way to do this? I have my new project command so far as:
npx nuxi init frontend --packageManager yarn
npx nuxi init frontend --packageManager yarn
And that does almost everything I need to create a new project. I NEVER initialize a git repo in my frontend folder (typically monorepos with separate backend). Isn't there some flag to make this not a thing? Personally I think it should be initialized without it anyways.
3 replies
NNuxt
Created by Zack Plauché on 7/12/2024 in #❓・help
How to access useLocalStorage in Nuxt 3?
I know some Vue Use things come built-in like useHead and what not. But does it also come with useLocalStorage? If not, how to add it?
9 replies
NNuxt
Created by Zack Plauché on 6/28/2024 in #❓・help
NuxtLink download="false" error
On render :download="false" actually becomes download="false"
<template>
<NuxtLink :to="linkMap[linkField.linktype]" :target="linkField.target" :download="linkField.linktype === 'asset'">
<slot />
</NuxtLink>
</template>

<script setup>
const { linkField } = defineProps({ linkField: Object })

const linkMap = {
url: linkField.url,
asset: linkField.url,
email: `mailto:${linkField.email}`,
story: linkField.story?.url,
}
</script>
<template>
<NuxtLink :to="linkMap[linkField.linktype]" :target="linkField.target" :download="linkField.linktype === 'asset'">
<slot />
</NuxtLink>
</template>

<script setup>
const { linkField } = defineProps({ linkField: Object })

const linkMap = {
url: linkField.url,
asset: linkField.url,
email: `mailto:${linkField.email}`,
story: linkField.story?.url,
}
</script>
5 replies
NNuxt
Created by Zack Plauché on 6/15/2024 in #❓・help
Nuxt DevTools: RPC error on executing "installNuxtModule"
No description
2 replies
NNuxt
Created by Zack Plauché on 4/25/2024 in #❓・help
useCookie typescript saying that Boolean should be a string, when it's a boolean
I have code that does:
const login() => {
const isLoggedIn = useCookie('isLoggedIn')
isLoggedIn.value = 'true'
}

definePageMeta({
middleware: () => {
const isLoggedIn = useCookie('isLoggedIn')
if (isLoggedIn.value === 'true') {
navigateTo('/page/')
}
}
})
const login() => {
const isLoggedIn = useCookie('isLoggedIn')
isLoggedIn.value = 'true'
}

definePageMeta({
middleware: () => {
const isLoggedIn = useCookie('isLoggedIn')
if (isLoggedIn.value === 'true') {
navigateTo('/page/')
}
}
})
Problem is, isLoggedIn.value actually returns a Boolean, not a string like TypeScript thinks 🙂 So looks like something might be wrong with the docs for this 👀 How to fix it? Literally this works:
if (isLoggedIn.value === true) {...}
if (isLoggedIn.value === true) {...}
But typescript says it's wrong.
2 replies
NNuxt
Created by Zack Plauché on 4/25/2024 in #❓・help
Public Images breaking on Hot Reload (latest nuxt version, literally today's project)
Created a project and have 2 image tags pointing to public. Everytime I make a change and save (hot reload) it breaks and it makes the little image not found icon. Nothing crazy.
<img src="/my-image.png">
<img src="/my-image.png">
Is there a known solution to this issue?
2 replies
NNuxt
Created by Zack Plauché on 1/10/2023 in #❓・help
`window is not defined` and `document is not defined`
I'm getting window is not defined, and document is not defined. I'm using one in a composable and another in a view. I understand it has to do with server vs client side, and it's only an issue when my server reloads after I add it on the page. Otherwise it works. How do I make my composable / component "client side"?
3 replies
NNuxt
Created by Zack Plauché on 12/18/2022 in #❓・help
Are you supposed to use useFetch for other requests than GET?
Literally just that. Can you send POST requests with useFetch? and if so, how?
2 replies
NNuxt
Created by Zack Plauché on 11/18/2022 in #❓・help
Is the Script tag from useHead not a thing anymore?
No description
7 replies