Skip to content

Can't use layer repo, but local clone works #915

Description

@mwolf-pi3g

Describe the bug
Using Nuxt 4 with an app layer and base layer when the base is a github repo
Browser error:

Cannot find module '<repo path>/node_modules/@nuxthub/db/schema-JMBu9Xzq.mjs' imported from <repo path>/node_modules/@nuxthub/db/schema.mjs

Base layer: https://github.com/mwolf-pi3g/nuxt-base-app/tree/main

Steps to reproduce
Steps to reproduce the behavior:

  1. Using the above repo link as a base layer

Steps to hack/fix:

ln -sf <repo path>/.nuxt/hub/db/schema-JMBu9Xzq.mjs <repo path>/node_modules/@nuxthub/db/schema-JMBu9Xzq.mjs

Cloning the repo works
However if instead i clone the above repo, run npm init in the base layer, and point the app to the on-disk content it runs without issue.

Expected behavior
Using a repo layer would not result in an issue.

Please let me know what, if any, config files would help in debugging.

head of app node_modules/@nuxthub/db/schema.mjs with on-disk base layer: (the import of the missing module does not get inserted)

import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
import { createInsertSchema, createSelectSchema, createUpdateSchema } from "drizzle-zod";
import "drizzle-orm";

//#region server/db/schema.ts
const schemaValidate$1 = {};
const accounts$1 = sqliteTable("accounts", {
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions