Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nuxi/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { coerce } from 'semver'
import { tryResolveNuxt } from './kit'

export async function getNuxtVersion(cwd: string, cache = true) {
const nuxtPkg = await readPackageJSON('nuxt', { url: cwd, try: true, cache })
const nuxtPkg = await readPackageJSON('nuxt', { url: cwd, try: true, cache }).catch(() => null)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a bug, if so, because try: true should do this automatically

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, understand. I'll have a look.

if (nuxtPkg) {
return nuxtPkg.version!
}
Expand Down
Loading