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.
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,
<...>
node:internal/errors:478
ErrorCaptureStackTrace(err);
^
Error: spawn ENAMETOOLONG
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,
code: 'ENAMETOOLONG',
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!