`generate` does not work in folders with spaces
See original GitHub issueC:\Users\Jan\Downloads\prisma chinook master cli-demo>npx prisma2 generate
'C:\Users\Jan\Downloads\prisma' is not recognized as an internal or external command,
operable program or batch file.
Error: Cannot call write after a stream was destroyed
with DEBUG=*
set:
C:\Users\Jan\Downloads\prisma chinook master cli-demo>set DEBUG=*
C:\Users\Jan\Downloads\prisma chinook master cli-demo>npx prisma2 generate
prisma .env loaded from ./prisma/.env +0ms
getos { platform: 'win32', libssl: undefined } +0ms
download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe. Result: {
command: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\query-engine-windows.exe --version',
exitCode: 0,
stdout: 'prisma d35b3d764e66598164f3b8ce821d452b09d4a613',
stderr: '',
all: undefined,
failed: false,
timedOut: false,
isCanceled: false,
killed: false
} +0ms
download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe. Result: prisma d35b3d764e66598164f3b8ce821d452b09d4a613 +3ms
download { works: true } +0ms
download { needsToBeDownloaded: false } +1ms
download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\migration-engine-windows.exe. Result: {
command: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\migration-engine-windows.exe --version',
exitCode: 0,
stdout: 'migration-engine-cli d35b3d764e66598164f3b8ce821d452b09d4a613',
stderr: '',
all: undefined,
failed: false,
timedOut: false,
isCanceled: false,
killed: false
} +8ms
download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\migration-engine-windows.exe. Result: migration-engine-cli d35b3d764e66598164f3b8ce821d452b09d4a613 +15ms
download { works: true } +2ms
download { needsToBeDownloaded: false } +0ms
download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\introspection-engine-windows.exe. Result: {
command: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\introspection-engine-windows.exe --version',
exitCode: 0,
stdout: 'introspection-core d35b3d764e66598164f3b8ce821d452b09d4a613',
stderr: '',
all: undefined,
failed: false,
timedOut: false,
isCanceled: false,
killed: false
} +2ms
download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\introspection-engine-windows.exe. Result: introspection-core d35b3d764e66598164f3b8ce821d452b09d4a613 +2ms
download { works: true } +0ms
download { needsToBeDownloaded: false } +0ms
getos { platform: 'win32', libssl: undefined } +128ms
getos { platform: 'win32', libssl: undefined } +19ms
download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe. Result: {
command: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\query-engine-windows.exe --version',
exitCode: 0,
stdout: 'prisma d35b3d764e66598164f3b8ce821d452b09d4a613',
stderr: '',
all: undefined,
failed: false,
timedOut: false,
isCanceled: false,
killed: false
} +75ms
download Getting version of C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe. Result: prisma d35b3d764e66598164f3b8ce821d452b09d4a613 +5ms
download { works: true } +1ms
download { needsToBeDownloaded: false } +0ms
getGenerators {
getGenerators binaryPathsWithEngineType: {
getGenerators 'query-engine': {
getGenerators windows: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\cli\\query-engine-windows.exe'
getGenerators }
getGenerators }
getGenerators } +0ms
engineCommands getDMMF, override prismaPath = C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe +0ms
engineCommands getConfig, override prismaPath = C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe +97ms
getos { platform: 'win32', libssl: undefined } +242ms
{
prismaClientDir: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\client'
}
getGenerators {
getGenerators outputPath: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\client',
getGenerators generatorPath: 'C:\\Users\\Jan\\Downloads\\prisma chinook master cli-demo\\node_modules\\@prisma\\client\\generator-build\\index.js'
getGenerators } +218ms
'C:\Users\Jan\Downloads\prisma' is not recognized as an internal or external command,
operable program or batch file.
Generator:C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\client\generator-build\index.js Sending "getManifest" rpc to generator +0ms
Error: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
at doWrite (_stream_writable.js:413:19)
at writeOrBuffer (_stream_writable.js:401:5)
at Socket.Writable.write (_stream_writable.js:301:11)
at GeneratorProcess.sendMessage (C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:549432)
at C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:549706
at new Promise (<anonymous>)
at GeneratorProcess.getManifest (C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:549558)
at Generator.<anonymous> (C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:745695)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\build\index.js:2:744975)
After renaming the folder to not contain spaces, everything works:
C:\Users\Jan\Downloads\prismachinookmastercli-demo>npx prisma2 generate
✔ Generated Prisma Client to .\node_modules\@prisma\client in 248ms
You can now start using Prisma Client in your code:
`
import { PrismaClient } from '@prisma/client'
// or const { PrismaClient } = require('@prisma/client')
const prisma = new PrismaClient()
`
Explore the full API: http://pris.ly/d/client
C:\Users\Jan\Downloads\prismachinookmastercli-demo>
version:
C:\Users\Jan\Downloads\prisma chinook master cli-demo>npx prisma2 --version
@prisma/cli : 2.0.0-alpha.978
Current platform : windows
Query Engine : prisma d35b3d764e66598164f3b8ce821d452b09d4a613 (at C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\query-engine-windows.exe)
Migration Engine : migration-engine-cli d35b3d764e66598164f3b8ce821d452b09d4a613 (at C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\migration-engine-windows.exe)
Introspection Engine : introspection-core d35b3d764e66598164f3b8ce821d452b09d4a613 (at C:\Users\Jan\Downloads\prisma chinook master cli-demo\node_modules\@prisma\cli\introspection-engine-windows.exe)
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Can GNU make handle filenames with spaces? - Stack Overflow
The bug #712 suggests that make does not handle names with spaces. Nowhere, never. I found a blog post saying it's partially implemented...
Read more >Solved: Folder names not working with spaces (sometimes!)
Solved: Hello, Creating my first flow, to auto-save Gmail attachments to OneDrive. It is (almost) working. In "OneDrive Create File" I use.
Read more >"make" command does not work in directories containing ...
1 Answer 1 · 1. It is a feature!! Spaces if directory- and file-names has never been good prattice in Linux or Unix....
Read more >How do I create a directory with a trailing space? - Super User
To create a directory in Windows with a trailing space character, bring up a command prompt and enter the following: md "\\?
Read more >Build fails with spaces in user directory · Issue #438 - GitHub
DON'T put the files under your user folder, or any sub directories from your user folder such as Documents, Downloads. Even USB drives...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks a lot for reporting 🙏 This issue is fixed in the latest alpha version of
@prisma/cli
. You can try it out withnpm i -g @prisma/cli@alpha
.In case it’s not fixed for you - please let us know and we’ll reopen this issue!
I have been struggling with this issue for the better part of the day, and I can’t believe it was as simple as removing a space from the parent path. Works for me now on Mac, thanks so much!