Skip to content

"../../../convex/**/*.*s" to find convex modules doesn't work with pnpm #48

@raythurnvoid

Description

@raythurnvoid

Hello i followed the steps in the docs to run convex-test with the only difference that i use pnpm.

I found this in the convex-test source

function moduleCache(specifiedModules) { const modules = specifiedModules ?? import.meta.glob("../../../convex/**/*.*s"); const prefix = findModulesRoot(Object.keys(modules), specifiedModules !== undefined); const modulesWithoutExtension = Object.fromEntries(Object.entries(modules).map(([path, module]) => [ path.replace(/\.[^.]+$/, ""), module, ])); return async (path) => { const module = modulesWithoutExtension[prefix + path]; if (module === undefined) { throw new Error(`Could not find module for: "${path}"`); } return await module(); }; }

Unfortunately pnpm saves the node_modules deep

node_modules\.pnpm\convex-test@0.0.38_convex@1_3a1a6bf1a42607c7ea66e8378e724539\node_modules\convex-test\dist\index.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions