You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by jonathandion December 10, 2024
Hi,
I’m encountering an issue while using the isMonorepo option. Here’s my setup:
• Frameworks/Tools: Next.js with Turbo Repo and Yarn workspaces.
• Workspace Structure (defined in the root package.json):
package.json using workspaces:
{
"workspaces": [
"packages/*",
"apps/*"
]
}
I created a new ReNative project using npx rnv new outside my mono repo and copied the generated project in my apps folder.
Following the project creation, I updated the renative.json configuration in the new project with:
{
"isMonorepo": true
}
However, when I try to run a command (e.g., rnv run), I encounter the following error:
This project is marked as part of monorepo and it has no custom install tasks. Run your usual monorepo bootstrap procedure and re-run command again.
error: ⨯ Cancelled
What I Need Help With
Could you provide an example or detailed steps on how to properly set up ReNative in a monorepo environment like Turbo repo?
Where exactly should I execute the npx rnv new command? Should it be inside a specific folder, like apps/, or somewhere else?
What does ReNative mean by “custom install tasks”? Are there additional steps or configurations required beyond enabling "isMonorepo": true in renative.json?
Do I need to have my renative.json at the root of my mono repo?
Update 1: When using Yarn Workspaces, everything works as expected but I'm not using it the isMonoRepo flag . However, when integrating with Turbo Repo, I encounter the following error:
info: Current engine: @rnv/engine-core (../../../.npm-packages/lib/node_modules/rnv/node_modules/@rnv/engine-core/lib)
task: ○ new ↺1
? What's your project Name? (folder will be created) hello-renative? What workspace to use? rnv? What template to use? @rnv/template-starter - Multiplatform 'hello world' template✔ Executing: npm view @rnv/template-starter versions✔ Executing: npm dist-tag ls @rnv/template-starter? What @rnv/template-starter version to use? 1.7.0 (@latest)✖ FAILED: yarn add @rnv/[email protected] --deverror: ⨯ COMMAND:yarn add @rnv/[email protected] --devFAILED with ERROR:error An unexpected error occurred: "Cannot read properties of undefined (reading 'manifest')".info If you think this is a bug, please open a bug report with the information provided in "/Users/jondion/code/my-turborepo/apps/hello-renative/yarn-error.log".info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.Error: Command failed with exit code 1: yarn add @rnv/[email protected] --devwarning package.json: No license fieldwarning Missing version in workspace at "/Users/jondion/code/my-turborepo/apps/hello-renative", ignoring.error An unexpected error occurred: "Cannot read properties of undefined (reading 'manifest')".yarn add v1.22.19info No lockfile found.info If you think this is a bug, please open a bug report with the information provided in "/Users/jondion/code/my-turborepo/apps/hello-renative/yarn-error.log".info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. at makeError (/Users/jondion/.npm-packages/lib/node_modules/rnv/node_modules/execa/lib/error.js:60:11) at handlePromise (/Users/jondion/.npm-packages/lib/node_modules/rnv/node_modules/execa/index.js:118:26) at processTicksAndRejections (node:internal/process/task_queues:95:5)yarn add v1.22.19warning package.json: No license fieldinfo No lockfile found.warning Missing version in workspace at "/Users/jondion/code/my-turborepo/apps/hello-renative", ignoring.error An unexpected error occurred: "Cannot read properties of undefined (reading 'manifest')".info If you think this is a bug, please open a bug report with the information provided in "/Users/jondion/code/my-turborepo/apps/hello-renative/yarn-error.log".info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Update 2: I was able to bypass the error above, but now I'm facing an error when running npx rnv build -p web
Error: <Html> should not be imported outside of pages/_document.
Read more: https://nextjs.org/docs/messages/no-document-import-in-page
at Q (/Users/jondion/code/pfu-qub-web/apps/demo-tv/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js:16:5430)
at W (/Users/jondion/code/pfu-qub-web/apps/demo-tv/platformBuilds/app_web/output/server/chunks/943.js:6:388)
at Wc (/Users/jondion/code/pfu-qub-web/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
at Zc (/Users/jondion/code/pfu-qub-web/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
Error occurred prerendering page "/500". Read more: https://nextjs.org/docs/messages/prerender-error
Error: <Html> should not be imported outside of pages/_document.
Read more: https://nextjs.org/docs/messages/no-document-import-in-page
```</div>
The text was updated successfully, but these errors were encountered:
Discussed in #1822
Originally posted by jonathandion December 10, 2024
Hi,
I’m encountering an issue while using the
isMonorepo
option. Here’s my setup:• Frameworks/Tools: Next.js with Turbo Repo and Yarn workspaces.
• Workspace Structure (defined in the root package.json):
package.json
using workspaces:I created a new ReNative project using
npx rnv new
outside my mono repo and copied the generated project in myapps
folder.Following the project creation, I updated the
renative.json
configuration in the new project with:However, when I try to run a command (e.g., rnv run), I encounter the following error:
What I Need Help With
renative.json
at the root of my mono repo?Update 1: When using Yarn Workspaces, everything works as expected but I'm not using it the
isMonoRepo
flag . However, when integrating with Turbo Repo, I encounter the following error:Update 2: I was able to bypass the error above, but now I'm facing an error when running
npx rnv build -p web
The text was updated successfully, but these errors were encountered: