question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prisma generate : The "path" argument must be of type string

See original GitHub issue

Bug description

I am running same versions of prisma and prisma/client which is ~2.20.1, when executing yarn prisma:generate it thows the following exception

Error:
✔ Generated Prisma Client (2.20.1) to ./node_modules/@prisma/client in 125ms

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received an instance of Object
    at mkdir (internal/fs/promises.js:467:10)
    at Object.generate [as onGenerate] (/home/programmer/projects/wemaku-api/node_modules/prisma-dbml-generator/dist/cli/dbml-generator.js:14:15)
    at LineStream.<anonymous> (/home/programmer/projects/wemaku-api/node_modules/@prisma/generator-helper/dist/generatorHandler.js:13:46)
    at LineStream.emit (events.js:315:20)
    at addChunk (internal/streams/readable.js:309:12)
    at readableAddChunk (internal/streams/readable.js:284:9)
    at LineStream.Readable.push (internal/streams/readable.js:223:10)
    at LineStream.Transform.push (internal/streams/transform.js:166:32)
    at LineStream._pushBuffer (/home/programmer/projects/wemaku-api/node_modules/@prisma/generator-helper/dist/byline.js:108:23)
    at LineStream._transform (/home/programmer/projects/wemaku-api/node_modules/@prisma/generator-helper/dist/byline.js:100:10)

Expected behavior

Prisma generate should run without any errors.

Environment & setup

  • OS: Ubuntu 18.03
  • Database: PostgreSQL
  • Node.js version: v8.10.0
  • Prisma version: 2.20.1
  • @prisma/client version: 2.20.1
Environment variables loaded from .env
prisma               : 2.20.1
@prisma/client       : 2.20.1
Current platform     : debian-openssl-1.1.x
Query Engine         : query-engine 60ba6551f29b17d7d6ce479e5733c70d9c00860e (at node_modules/@prisma/engines/query-engine-debian-openssl-1.1.x)
Migration Engine     : migration-engine-cli 60ba6551f29b17d7d6ce479e5733c70d9c00860e (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core 60ba6551f29b17d7d6ce479e5733c70d9c00860e (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary        : prisma-fmt 60ba6551f29b17d7d6ce479e5733c70d9c00860e (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : 60ba6551f29b17d7d6ce479e5733c70d9c00860e
Studio               : 0.365.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
shafikhaancommented, May 19, 2021

@janpio sorry for being late here, prisma-dbml-generator wasn’t the newest, that solved my issue, Ty

1reaction
Bariyardcommented, Jun 1, 2021

confirmed that it was caused by prisma-dbml-generator

@janpio sorry for being late here, prisma-dbml-generator wasn’t the newest, that solved my issue, Ty

Read more comments on GitHub >

github_iconTop Results From Across the Web

The "path" argument must be of type string. Received ... - GitHub
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object when old @prisma/client in parent folder #6372.
Read more >
typeerror [err_invalid_arg_type]: the "file" argument must be of ...
The error message means that a method of the path module (like path.join ) expects one of its arguments to be a string...
Read more >
ERR_INVALID_ARG_TYPE error with prisma during Heroku ...
... Prisma schema loaded from prisma/schema.prisma Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string.
Read more >
Prisma schema API (Reference)
This can point to a file that implements a generator or specify a built-in generator directly. output, No, String (file path), Determines the...
Read more >
How To Fix Sfdx Error: The "Path" Argument Must Be Of Type ...
TypeError [ERRINVALIDARGTYPE]: The path argument must be of type string. Received an instance of Object when old @prisma/client in parent folder #6372. I ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found