Closed kevinlangleyjr closed 2 years ago
Hi, someone recently had this error with a monorepo and yarn3. They solved it by adding this to package.json:
"installConfig": {
"hoistingLimits": "workspaces"
}
Could you try that and see if that helps?
The problem is that next
dependency wasn't resolved properly — it probably happens because you have other apps that use next
and there's only one version installed (and not what Blitz needs).
@beerose, thanks for the fast response!
I tried adding the hoisting limits in my package.json as you suggested. Unfortunately I am still encountering the same exact error with getProjectRoot()
being called from buildConfigIfNeeded()
.
I cloned your repo and modified workspaces
config to this in package.json
:
"workspaces": {
"packages": [
"apps/*",
"packages/*"
],
"nohoist": [
"**/blitz",
"**/@blitzjs/*",
"**/next"
]
},
That seems to work now.
That worked perfectly, thank you @beerose!!!
What is the problem?
When trying to spin up a Blitz app within a Turborepo monorepo, I keep getting the same error:
I have a sample repo located here that reproduces the error.
Paste all your error logs here:
Paste all relevant code snippets here:
What are detailed steps to reproduce this?
./apps/{name-of-app}
yarn dev
ornpm run dev
(depending on which was chosen when setting up Turborepo)Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
No response