I’ve already wrote this in Discord and a Core Member told me, that i should crosspost it here in the forum. I will post a link to the Discord Post first and then describe my problem here, too.
Discord Link:
Problem Description:
I’m at the point in the tutorial where i have to run
yarn rw setup auth dbAuth
When I do this, i get the following Error Message:
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
I know it has something to to with the yarn workspaces but i don’t want to screw up my tutorial setup by using the W flag. What is the correct way to solve this?
I got the error with redwood version 7.1.0 and yarn 1.22.19. I upgraded to 7.1.1 and also 7.1.2. but this doesn’t help.
I also noticed, that there is a similar problem when i want to start storybook with “yarn rw storybook”. then, the following error is displayed:
> yarn rw storybook
yarn run v1.22.19
$ /Users/tobias/Workspace/redwoodblog/node_modules/.bin/rw storybook
Installing plugin "@redwoodjs/cli-storybook"...
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Command failed with exit code 1: yarn add -D @redwoodjs/cli-storybook@7.1.1
at makeError (/Users/tobias/Workspace/redwoodblog/node_modules/execa/lib/error.js:60:11)
at handlePromise (/Users/tobias/Workspace/redwoodblog/node_modules/execa/index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async installRedwoodModule (/Users/tobias/Workspace/redwoodblog/node_modules/@redwoodjs/cli/dist/lib/packages.js:85:5)
at async installPluginPackage (/Users/tobias/Workspace/redwoodblog/node_modules/@redwoodjs/cli/dist/lib/plugin.js:214:5)
at async loadPluginPackage (/Users/tobias/Workspace/redwoodblog/node_modules/@redwoodjs/cli/dist/lib/plugin.js:159:21)
at async loadCommandsFromCacheOrPackage (/Users/tobias/Workspace/redwoodblog/node_modules/@redwoodjs/cli/dist/plugin.js:262:18)
at async loadPlugins (/Users/tobias/Workspace/redwoodblog/node_modules/@redwoodjs/cli/dist/plugin.js:197:22)
at async runYargs (/Users/tobias/Workspace/redwoodblog/node_modules/@redwoodjs/cli/dist/index.js:188:3)
at async /Users/tobias/Workspace/redwoodblog/node_modules/@redwoodjs/cli/dist/index.js:137:7 {
shortMessage: 'Command failed with exit code 1: yarn add -D @redwoodjs/cli-storybook@7.1.1',
command: 'yarn add -D @redwoodjs/cli-storybook@7.1.1',
escapedCommand: 'yarn add -D "@redwoodjs/cli-storybook@7.1.1"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}