`yarn rw setup <cmd>`s are broken

➜  myproject git:(master) ✗ yarn rw setup auth dbAuth 
rw setup <commmand>

Initialize project config and install packages

Options:
  --help     Show help                                         [boolean]
  --version  Show version number                               [boolean]
  --cwd      Working directory to use (where `redwood.toml` is located.)

Also see the Redwood CLI Reference
(​https://redwoodjs.com/docs/cli-commands#setup​)

Unknown argument: dbAuth

Hi @patrickeddy !
I can’t reproduce it on the last version of Redwood. On which version are you ?

1.5.2.

Did you try it with a brand new project?

1 Like

I did, can you do yarn rw info to know what is your system and version?
Thanks !

➜  myproject git:(master) rw info              

  System:
    OS: macOS 12.3.1
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.15.0 - /private/var/folders/zf/xgyy6t2n5mvcmkycbdn9mhm80000gn/T/xfs-d35c096e/node
    Yarn: 3.2.1 - /private/var/folders/zf/xgyy6t2n5mvcmkycbdn9mhm80000gn/T/xfs-d35c096e/yarn
  Databases:
    SQLite: 3.37.0 - /usr/bin/sqlite3
  Browsers:
    Chrome: 102.0.5005.115
    Firefox: 96.0.3
    Safari: 15.4
  npmPackages:
    @redwoodjs/core: ^1.5.2 => 1.5.2 

I’m using Postgres through Docker locally, not SQLite.

1 Like

@simoncrypta any progress on this? Still not working. :cry:

It’s a bit awkward, but I forget my MacBook somewhere yesterday, so I can’t test it. One thing I know that can solve it is to delete all the node module and redo yarn install.

No luck.

➜  myproject git:(master) rm -rf node_modules
➜  myproject git:(master) ✗ yarn
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @endemolshinegroup/cosmiconfig-typescript-loader@npm:3.0.2 [45ce6] doesn't provide typescript (p691cb), requested by ts-node
➤ YN0002: │ @redwoodjs/api-server@npm:1.5.2 doesn't provide @babel/core (pc6839), requested by @babel/plugin-transform-runtime
➤ YN0002: │ @redwoodjs/cli@npm:1.5.2 doesn't provide react (paa02c), requested by @redwoodjs/prerender
➤ YN0002: │ @redwoodjs/cli@npm:1.5.2 doesn't provide react-dom (p634b3), requested by @redwoodjs/prerender
➤ YN0002: │ @redwoodjs/core@npm:1.5.2 doesn't provide @babel/eslint-parser (p3c27d), requested by @babel/eslint-plugin
➤ YN0002: │ @redwoodjs/core@npm:1.5.2 doesn't provide eslint (p78135), requested by @babel/eslint-plugin
➤ YN0002: │ @redwoodjs/eslint-config@npm:1.5.2 doesn't provide babel-plugin-module-resolver (pe5d4c), requested by eslint-import-resolver-babel-module
➤ YN0002: │ @redwoodjs/graphql-server@npm:1.5.2 doesn't provide @envelop/core (p9628b), requested by @envelop/depth-limit
➤ YN0002: │ @redwoodjs/graphql-server@npm:1.5.2 doesn't provide @envelop/core (pdb493), requested by @envelop/disable-introspection
➤ YN0002: │ @redwoodjs/graphql-server@npm:1.5.2 doesn't provide @envelop/core (pbfdb5), requested by @envelop/filter-operation-type
➤ YN0002: │ @redwoodjs/graphql-server@npm:1.5.2 doesn't provide @envelop/core (p91f60), requested by @envelop/parser-cache
➤ YN0002: │ @redwoodjs/graphql-server@npm:1.5.2 doesn't provide @envelop/core (pe8715), requested by @envelop/validation-cache
➤ YN0002: │ @redwoodjs/internal@npm:1.5.2 doesn't provide @babel/core (pfd6b6), requested by @babel/plugin-transform-typescript
➤ YN0002: │ @redwoodjs/internal@npm:1.5.2 doesn't provide @babel/core (pbeb77), requested by @babel/register
➤ YN0002: │ @redwoodjs/internal@npm:1.5.2 doesn't provide @babel/core (p59bb3), requested by babel-plugin-graphql-tag
➤ YN0002: │ @redwoodjs/internal@npm:1.5.2 doesn't provide @babel/core (p1698e), requested by babel-plugin-polyfill-corejs3
➤ YN0002: │ @redwoodjs/internal@npm:1.5.2 doesn't provide graphql-tag (pe2576), requested by @graphql-codegen/typescript-react-apollo
➤ YN0002: │ @redwoodjs/internal@npm:1.5.2 doesn't provide graphql-tag (p9475c), requested by babel-plugin-graphql-tag
➤ YN0002: │ @redwoodjs/prerender@npm:1.5.2 [567b8] doesn't provide prop-types (p73a5a), requested by @redwoodjs/web
➤ YN0002: │ @redwoodjs/router@npm:1.5.2 doesn't provide react (p5a934), requested by @reach/skip-nav
➤ YN0002: │ @redwoodjs/router@npm:1.5.2 doesn't provide react-dom (p30191), requested by @reach/skip-nav
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide @babel/core (p50607), requested by @storybook/addon-essentials
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide @babel/core (pd7bec), requested by babel-jest
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide @babel/core (p88d01), requested by babel-plugin-inline-react-svg
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide @testing-library/dom (p75128), requested by @testing-library/user-event
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide prop-types (pc5724), requested by @redwoodjs/web
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react (pdea5f), requested by @redwoodjs/web
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react (p420ed), requested by @storybook/builder-webpack5
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react (pf7896), requested by @storybook/manager-webpack5
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react (p12c24), requested by @storybook/react
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react (pcfa96), requested by @testing-library/react-hooks
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react (p916f2), requested by @testing-library/react
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react-dom (p71fec), requested by @redwoodjs/web
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react-dom (p4ac57), requested by @storybook/builder-webpack5
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react-dom (p2f255), requested by @storybook/manager-webpack5
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react-dom (pac179), requested by @storybook/react
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide react-dom (p45ee3), requested by @testing-library/react
➤ YN0002: │ @redwoodjs/testing@npm:1.5.2 doesn't provide require-from-string (pf8912), requested by @storybook/react
➤ YN0002: │ @storybook/addon-docs@npm:6.5.4 [88b48] doesn't provide @babel/core (pdf13f), requested by @babel/preset-env
➤ YN0002: │ @storybook/addon-docs@npm:6.5.4 [88b48] doesn't provide @babel/core (p5c516), requested by @babel/plugin-transform-react-jsx
➤ YN0002: │ @storybook/addon-docs@npm:6.5.4 [88b48] doesn't provide @babel/core (p43ed3), requested by babel-loader
➤ YN0002: │ @storybook/addon-docs@npm:6.5.4 [88b48] doesn't provide webpack (paf80b), requested by babel-loader
➤ YN0002: │ @storybook/docs-tools@npm:6.5.4 doesn't provide react (p78789), requested by @storybook/store
➤ YN0002: │ @storybook/docs-tools@npm:6.5.4 doesn't provide react-dom (p8955f), requested by @storybook/store
➤ YN0002: │ @storybook/mdx1-csf@npm:0.0.2-canary.5.6cee405.0 doesn't provide @babel/core (p9e93f), requested by @babel/preset-env
➤ YN0002: │ @storybook/mdx1-csf@npm:0.0.2-canary.5.6cee405.0 doesn't provide react (p6f697), requested by @mdx-js/react
➤ YN0002: │ @storybook/telemetry@npm:6.5.4 doesn't provide react (p22cf8), requested by @storybook/core-common
➤ YN0002: │ @storybook/telemetry@npm:6.5.4 doesn't provide react-dom (p4edda), requested by @storybook/core-common
➤ YN0002: │ react-hot-toast@npm:2.2.0 [4fbfc] doesn't provide csstype (pd9b92), requested by goober
➤ YN0002: │ react-hot-toast@npm:2.2.0 [9afd4] doesn't provide csstype (p5137c), requested by goober
➤ YN0002: │ react-hot-toast@npm:2.2.0 [a1963] doesn't provide csstype (p00e2f), requested by goober
➤ YN0002: │ react-hubspot-form@npm:1.3.7 doesn't provide react (pa9a4c), requested by styled-jsx
➤ YN0002: │ web@workspace:web doesn't provide graphql (pb8627), requested by @redwoodjs/forms
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 756ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 2s 537ms
➤ YN0000: ┌ Link step
➤ YN0007: │ core-js@npm:3.22.5 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.22.8 must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.14.39 must be built because it never has been before or the last one failed
➤ YN0007: │ nodemon@npm:2.0.16 must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.14.43 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.22.8 must be built because it never has been before or the last one failed
➤ YN0007: │ msw@npm:0.39.2 must be built because it never has been before or the last one failed
➤ YN0007: │ fsevents@patch:fsevents@npm%3A1.2.13#~builtin<compat/fsevents>::version=1.2.13&hash=18f3a7 must be built because it never has been before or the last one failed
➤ YN0007: │ @prisma/client@npm:3.14.0 [67cc8] must be built because it never has been before or the last one failed
➤ YN0007: │ @prisma/engines@npm:3.14.0-36.2b0c12756921c891fec4f68d9444e18c7d5d4a6a must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:2.6.12 must be built because it never has been before or the last one failed
➤ YN0007: │ prisma@npm:3.14.0 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 1m 9s
➤ YN0000: Done with warnings in 1m 13s
➜  myproject git:(master) ✗ rw setup auth dbAuth
rw setup <commmand>

Initialize project config and install packages

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
  --cwd      Working directory to use (where `redwood.toml` is located.)

Also see the Redwood CLI Reference
(​https://redwoodjs.com/docs/cli-commands#setup​)

Unknown argument: dbAuth

Hi. I may have misread your output, but did you type

“rw setup auth dbAuth”

Or

“yarn rw setup auth dbAuth”

?

The second is the correct command.

I have alias rw="yarn rw" in my .zshrc. Either command is the same.

For posterity:

➜  myproject git:(master) ✗ yarn rw setup auth dbAuth
rw setup <commmand>

Initialize project config and install packages

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
  --cwd      Working directory to use (where `redwood.toml` is located.)

Also see the Redwood CLI Reference
(​https://redwoodjs.com/docs/cli-commands#setup​)

Unknown argument: dbAuth

@dom are you aware of any yarn setup issues? This may be using yarn 3 in a project.

Definitely using yarn 3:

# .yarnrc.yml

# Yarn's manifest file. You can configure yarn here.
# See https://yarnpkg.com/configuration/yarnrc.

# For `node_modules` (see `nodeLinker` below), this is almost always the preferred option.
compressionLevel: 0

enableGlobalCache: true

# Lets yarn use hardlinks inside `node_modules` to dedupe packages.
# For a more pnpm-like experience, consider `hardlinks-global` where hardlinks point to a global store.
nmMode: hardlinks-local

# How to install Node packages.
# Heads up: right now, Redwood expects this to be `node-modules`.
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.2.1.cjs

Even after downgrading to yarn@1.22.10, still same issue:

➜  myproject git:(master) ✗ rm -rf node_modules yarn.lock
➜  myproject git:(master) ✗ yarn
...
➜  myproject git:(master) ✗ yarn rw setup auth dbAuth
yarn run v1.22.10
$ /Users/patrickeddy/myproject/node_modules/.bin/rw setup auth dbAuth
rw setup <commmand>

Initialize project config and install packages

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]
  --cwd      Working directory to use (where `redwood.toml` is located.)

Also see the Redwood CLI Reference
(​https://redwoodjs.com/docs/cli-commands#setup​)

Unknown argument: dbAuth
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Other redwood CLI commands work fine btw.

I’ve resolved it this way:

  1. Downgrade yarn to 1.22.10
  2. Created a new project
  3. Ran yarn rw setup auth dbAuth
  4. Copied over web, api, scripts, redwood.toml, .env, docker-compose.yml to new project
  5. Then finally ran docker-compose up, yarn rw prisma migrate dev (which may have been the thing that broke it in the beginning? :thinking:)

Thanks for the attempt to help! :laughing:

2 Likes

Just throwing it out there, as I was unable to reproduce this locally - if docker is not running (in this case presumably the postgres container from docker-compose.yml ), will that effect yarn rw setup auth dbAuth?

I was not using docker locally so that is the thing I am most curious about effecting the run of the failing command. Not sure why that would effect it…

1 Like

@patrickeddy I’m happy that you find a way to resolve this, but we can agree that is not the more convenient way to do so.

I have already seen this bug before, so I really want to know what is the cause.
I keep you update :slight_smile: