Yarn workspace monorepo not building on pages

Any idea why the build fails? I've tried numerous combinations for the build configs and can't seem to get it to work
3 Replies
Waiiki
Waiiki12mo ago
{
"private": true,
"workspaces": ["packages/**"],
"nohoist": [
"**/react-native",
"**/react-native/**",
"jetifier",
"react-native-safe-area-context",
"react-native-screens",
"@react-native-community/**",
"@react-navigation/**"
]
}
{
"private": true,
"workspaces": ["packages/**"],
"nohoist": [
"**/react-native",
"**/react-native/**",
"jetifier",
"react-native-safe-area-context",
"react-native-screens",
"@react-native-community/**",
"@react-navigation/**"
]
}
so I need to add a build script here? This is my root package.json I also have another package.json where my /web (react) project is, which has the actual craco build script so because I'm using yarn workspaces, I normally run "yarn install" in the root directory, and then "yarn start" in the /packages/web project not sure if you're familiar with yarn workspaces
13:28:37.376 Verify run directory
13:28:37.376 Executing user command: yarn build
13:28:37.380 /opt/build/bin/build: line 39: yarn: command not found
13:28:37.386 Failed: build command exited with code: 127
13:28:38.241 Failed: error occurred while running build command
13:28:37.376 Verify run directory
13:28:37.376 Executing user command: yarn build
13:28:37.380 /opt/build/bin/build: line 39: yarn: command not found
13:28:37.386 Failed: build command exited with code: 127
13:28:38.241 Failed: error occurred while running build command
Waiiki
Waiiki12mo ago
Waiiki
Waiiki12mo ago
not sure if this is right evidently not lol cd packages/web && yarn build should be placed in the build command? it worked! thank you!!!!