We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5198b39 commit 9b656bcCopy full SHA for 9b656bc
src/module.ts
@@ -116,7 +116,9 @@ export default defineNuxtModule<ModuleOptions>({
116
return
117
}
118
// couldn't be found for some reason, assume compatibility
119
- const { version: unheadVersion } = await readPackageJSON('@unhead/vue')
+ const { version: unheadVersion } = await readPackageJSON('@unhead/vue', {
120
+ from: nuxt.options.modulesDir,
121
+ }).catch(() => ({ version: null }))
122
if (unheadVersion?.startsWith('1')) {
123
logger.error(`Nuxt Scripts requires Unhead >= 2, you are using v${unheadVersion}. Please run \`nuxi upgrade --clean\` to upgrade...`)
124
0 commit comments