Yarn create redwood-app fails on Windows

I’m following the tutorial, but I’m running into an issue when running the create project script:

yarn create redwood-app --ts ./redwoodblog

I get the following error:

yarn create v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
<several warnings about packages having unmet peer dependencies>
[4/4] Building fresh packages...
success Installed "create-redwood-app@3.8.0" with binaries:
      - create-redwood-app
The filename, directory name, or volume label syntax is incorrect.
error Command failed.
Exit code: 1
Command: f:\data\yarn\packages\bin\create-redwood-app
Arguments: --ts ./redwoodblog
Directory: F:\src\web\redwoodjs

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

I’m running Widows 10, using the VSCode terminal, and I followed the Windows setup instructions here.

I tried googling the error, but didn’t come up with much that was useful. I think this is an issue with yarn, but I’m stumped on what the error is. The closest threads I found for that error had to do with yarn being unable to handle paths with spaces on Windows, but that’s not my case, and their suggested fixes didn’t work for me.

Anyone know what could be causing this?

No idea on troubleshooting here - but another yarn issue with this error (from create-react-app) from May 2022: The filename, directory name, or volume label syntax is incorrect · Issue #12425 · facebook/create-react-app · GitHub

Ok it took a while, but I finally figured out the first problem with the syntax error. I hadn’t set up a project on yarn directly for a while and wasn’t aware of the yarn 2 set of changes. I thought I was on latest yarn, but starting with v2, trying to update through chocolatey doesn’t work. Instead, I followed the instructions here to switch to yarn 3, and that solved the problem.

It looks like the Redwood tutorial has out dated instructions on installing yarn. It also says that Redwood supports LTS node, which is not the case now that LTS is on v18+. I’ll send a PR to update the docs.

Edit: never mind on the version thing. I just saw that v4 of Redwood supports node 18.x

However, the create redwood script fails with a different error:

➤ YN0000: Failed with errors in 4m 13s
    at makeError (C:\Users\Jorge\AppData\Local\Yarn\Berry\cache\execa-npm-5.1.1-191347acf5-8.zip\node_modules\execa\lib\error.js:60:11)
    at handlePromise (C:\Users\Jorge\AppData\Local\Yarn\Berry\cache\execa-npm-5.1.1-191347acf5-8.zip\node_modules\execa\index.js:118:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Task.run (C:\Users\Jorge\AppData\Local\Temp\xfs-97d74f90\dlx-27120\.yarn\__virtual__\listr2-virtual-3cfbc18120\4\Yarn\Berry\cache\listr2-npm-5.0.6-afdb33c352-8.zip\node_modules\listr2\dist\index.cjs:978:11)
    at async C:\Users\Jorge\AppData\Local\Yarn\Berry\cache\p-map-npm-4.0.0-4677ae07c7-8.zip\node_modules\p-map\index.js:57:22 {
  shortMessage: 'Command failed with exit code 1: yarn install',
  command: 'yarn install',
  escapedCommand: '"yarn install"',
  exitCode: 1,

    at ChildProcess.spawn (node:internal/child_process:420:11)
    at spawn (node:child_process:733:9)
    at sendTelemetry (C:\Users\Jorge\AppData\Local\Yarn\Berry\cache\create-redwood-app-npm-3.8.0-b9f27c0a7d-8.zip\node_modules\create-redwood-app\dist\create-redwood-app.js:182:32)
    at C:\Users\Jorge\AppData\Local\Yarn\Berry\cache\create-redwood-app-npm-3.8.0-b9f27c0a7d-8.zip\node_modules\create-redwood-app\dist\create-redwood-app.js:354:5
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  errno: -4064,
  syscall: 'spawn'

A quick Google search didn’t turn up anything specific to Redwood. I’ll need to dig in more once I have some more free time but if someone knows what’s happening please let me know!

Sounds like we need to figure out what command and/or package is too noisy.

This might be relevant [Bug] Dependencies with noisy prepare scripts fail to install · Issue #1989 · yarnpkg/berry · GitHub
And also this node.js - How to fix "Error: spawn ENAMETOOLONG" (probably cause by jq) in javascript? - Stack Overflow (Not that it’s exactly the same issue you’re having, but the question and the answer+comments might provide some clues)

@jl-g if you don’t figure it out, please write an issue on github so we can track it. Thanks! Issues · redwoodjs/redwood · GitHub