Skip to content
Merged
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
3 changes: 2 additions & 1 deletion packages/layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"modules",
"nuxt.config.ts",
"nuxt.schema.ts",
"server"
"server",
"utils"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

By adding the utils directory, you are enabling Nuxt's auto-import feature for the utilities within. However, the files utils/git.ts and utils/meta.ts use Node.js-specific APIs (like process and child_process) that are not available in the browser.

When Nuxt auto-imports utilities, they are available on both client and server unless specified otherwise. This will cause runtime errors if these functions are ever used in client-side code.

To prevent this, you should rename the files to mark them as server-only, following Nuxt's convention:

  • utils/git.tsutils/git.server.ts
  • utils/meta.tsutils/meta.server.ts

This ensures they are only auto-imported and available in a server context.

],
"scripts": {
"dev": "nuxt dev",
Expand Down