S
SolidJS•9mo ago
Starwort

Solid-CLI won't create any project

When creating using node (either via npx or bunx) the CLI fails simply stating 'something went wrong' - when running under bun, zlib causes a crash and solid-cli reports the operation as cancelled
No description
25 Replies
Starwort
StarwortOP•9mo ago
(n.b. I reformatted minizlib to see if that would fix the error - it did not)
jer3m01
jer3m01•9mo ago
Can you try with npm create solid@latest or bun create solid?
Starwort
StarwortOP•9mo ago
No description
No description
No description
Starwort
StarwortOP•9mo ago
(second one is bun --bun create solid - apparently I accidentally cut off the command)
jer3m01
jer3m01•9mo ago
Might have broken dependency, can you delete the cache and retry?
Starwort
StarwortOP•9mo ago
Exactly the same, including after clearing both bun's /tmp directories and its install cache
jer3m01
jer3m01•9mo ago
linked in https://discord.com/channels/722131463138705510/1127290052515467375 they'll probably have more insight than me
Tommypop
Tommypop•9mo ago
Hi, would you mind sharing your node version? I believe it fails on anything below 18 (our error message for this is terrible, it shouldn't just silently fail)
Starwort
StarwortOP•9mo ago
20.12.0, visible in the first image
Tommypop
Tommypop•9mo ago
Oh ofc sorry I missed that! I'll look into it now, sorry for this issue I've just tested node version 20.12.0 on Windows 11 Pro (Version 10.0.22631 Build 22631) and on Ubuntu 22.04.2 LTS and can't reproduce :( What OS are you on?
Starwort
StarwortOP•9mo ago
Ubuntu 22.04.3 LTS x86_64
Starwort
StarwortOP•9mo ago
(neofetch is incorrectly detecting stock Ubuntu as Kubuntu, presumably because I installed KDE lol)
No description
Starwort
StarwortOP•9mo ago
Also pinging me will get faster responses lol
Tommypop
Tommypop•9mo ago
Ty! Would you mind trying this pnpx @begit/cli@latest https://github.com/solidjs/templates ./ts --subdir ts Solid CLI uses this under the hood to clone the repository Noted haha
Starwort
StarwortOP•9mo ago
I don't have pnpx, is bunx fine? (bunx was not fine, but npx crashed)
Tommypop
Tommypop•9mo ago
Try it lol Ig we'll find out soon
Starwort
StarwortOP•9mo ago
Btw should I report this as a bug somewhere lol I don't even know if this is a begit thing or a bun thing 🙃
No description
Starwort
StarwortOP•9mo ago
Npx does this:
Starwort
StarwortOP•9mo ago
Just the end:


St [ZlibError]: zlib: unexpected end of file
at jr.write (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:22744)
at jr.flush (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:22207)
at jr.end (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:22294)
at EventEmitter.end (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:26:31381)
at Hs.end (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:14170)
at [emitEnd2] (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:19376)
at [emitEnd] (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:19235)
at gi.emit (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:18618)
at gi.emit (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:26:22281)
at [maybeEmitEnd] (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:18359) {
code: 'Z_BUF_ERROR',
errno: -5,
recoverable: false,
file: '/tmp/.begit/cache/solidjs-templates-924ee8359dc908c3ca3bd622c0c32dd2d666c78e.tar.gz',
tarCode: 'TAR_ABORT'
}


St [ZlibError]: zlib: unexpected end of file
at jr.write (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:22744)
at jr.flush (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:22207)
at jr.end (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:22294)
at EventEmitter.end (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:26:31381)
at Hs.end (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:14170)
at [emitEnd2] (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:19376)
at [emitEnd] (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:19235)
at gi.emit (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:18618)
at gi.emit (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:26:22281)
at [maybeEmitEnd] (file:///home/starwort/.npm/_npx/3afe89fd084d6a83/node_modules/@begit/cli/dist/index.js:24:18359) {
code: 'Z_BUF_ERROR',
errno: -5,
recoverable: false,
file: '/tmp/.begit/cache/solidjs-templates-924ee8359dc908c3ca3bd622c0c32dd2d666c78e.tar.gz',
tarCode: 'TAR_ABORT'
}
Starwort
StarwortOP•9mo ago
Well that's strange, I wonder why that happens lol
No description
Tommypop
Tommypop•9mo ago
Woah that's strange
Starwort
StarwortOP•9mo ago
This is the relevant bit though lol
Tommypop
Tommypop•9mo ago
I've just tried npx @begit/cli@latest https://github.com/solidjs/templates ./ts --subdir ts under ubuntu and had no issues Yeah seems like the tarball can't get extracted somehow
Starwort
StarwortOP•9mo ago
Weird, it was a corrupted cache When I removed the begit cache and tried again it worked I wonder how that happened @Tommypop seems like begit doesn't actually try to verify the cached file in any way, then crashes if it was corrupted (seems like mine was unexpectedly truncated) The 'something went wrong' error is just as unhelpful as always, though Presumably the fix for this is for upstream begit to try refetching the file if the cached version is corrupt
Tommypop
Tommypop•9mo ago
huh that's really strange oh ok, awesome! yup sounds good, I might implement that later yeah, I'll get round to fixing that soon hopefully! @Starwort | ping-reply I've just made begit fault attempt to redownload the tarball if extraction fails: https://github.com/Tommypop2/begit/commit/1d52fb530b0167db1ec222cd18be4712894cd62b#diff-9a4ceebe7c6f86856371906c3f061d3b56b7457022b05179884a113e7ced67e8 So this issue should be fixed when I release the next version of the CLI :)
Want results from more Discord servers?
Add your server