prisma: generate doesn't like spaces in project path

I noticed that prisma2 generate doesn’t work when path contains spaces on MacOS.

internal/modules/cjs/loader.js:582
    throw err;
    ^
Error: Cannot find module '/Users/me/devel/a'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
Error:
    Error: Generator at /Users/me/devel/a b/test-prisma2/prisma2-backend/node_modules/@prisma/photon/generator-build/index.js could not start:
    internal/modules/cjs/loader.js:582
        throw err;
        ^
    Error: Cannot find module '/Users/me/devel/a'
        at Timeout.setTimeout [as _onTimeout] (/Users/me/devel/a b/test-prisma2/prisma2-backend/node_modules/prisma2/build/index.js:231407:28)
error Command failed with exit code 1.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 18 (11 by maintainers)

Most upvoted comments

yes, I was using prisma-mulit-tenant and it rewrites the client file. So the issue was with that code rather then the original code.

I was able to find the issue on this. It appears that another package was updating the prisma client causing the issue. Thanks for looking into this!

@janpio in project path itself. output isn‘t set.