Cannot detect workspace root
See original GitHub issueEnvironment
- Operating System:
Darwin
- Node Version:
v16.17.1
- Nuxt Version:
3.0.0-rc.9
- Nitro Version:
0.5.4
- Package Manager:
unknown
- Builder:
vite
- User Config:
globalName
,builder
,app
,build
,modules
,postcss
,css
,components
,vite
,nitro
,hooks
- Runtime Modules:
@vueuse/nuxt@9.3.0
,nuxt-jsonld@2.0.6
- Build Modules:
-
Reproduction
Install the latest version and run nuxi generate
Describe the bug
Since the RC version 9 or higher I always get this error when trying to generate a static version of my frontend. Downgrading to RC8 (or below) works as expected.
Additional context
No response
Logs
$ cd /www/frontend
$ nuxi generate
Nuxi 3.0.0-rc.9 10:51:27
Nuxt 3.0.0-rc.9 with Nitro 0.5.4 10:51:27
ERROR Cannot detect workspace root from /www/frontend 10:51:28
at findWorkspaceDir (node_modules/pkg-types/dist/index.mjs:117:9)
at async loadOptions (node_modules/nitropack/dist/shared/nitro.9c828268.mjs:2271:26)
at async createNitro (node_modules/nitropack/dist/shared/nitro.9c828268.mjs:2347:19)
at async initNitro (node_modules/nuxt/dist/index.mjs:1373:17)
at async initNuxt (node_modules/nuxt/dist/index.mjs:1559:3)
at async loadNuxt (node_modules/nuxt/dist/index.mjs:1581:5)
at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:732:19)
at async Object.invoke (node_modules/nuxi/dist/chunks/build.mjs:33:18)
at async Object.invoke (node_modules/nuxi/dist/chunks/generate.mjs:31:5)
at async _main (node_modules/nuxi/dist/cli.mjs:50:20)
Issue Analytics
- State:
- Created a year ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
find-workspace-root - npm
Find the root of a multi-package repo with Yarn workspaces. ... Start using find-workspace-root in your project by running `npm i ...
Read more >why does yarn warn when adding a dependency to the root ...
Since it's assumed that your "root" project won't have it's own "production" dependencies and they should only be in the workspaces.
Read more >Modify a WorkSpace - AWS Documentation
To see the current modification state of a WorkSpace, select the arrow to show ... WorkSpace root and user volumes come in set...
Read more >Workspaces in Visual Studio Code
It is possible to leave the folders section of a .code-workspace file empty so that you end up with an instance of VS...
Read more >Creating and managing workspaces - Perforce
The workspace root, also referred to as client root Closed ... Stream-at-change workspaces are read-only; you cannot check files into a previous changelist....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
TLDR: a simple
git init
fixed it for mein my case the initial
npm install
failed (project created withnpx nuxi init nuxt-app
)looking at the stack trace: pkg-types tries to find the project folder using either:
findFile("/tmp/nuxt-issue-8014", { startsWith: "/tmp/nuxt-issue-8014" });
will throw an error for some reason 🤷♂️In the case of the test-case repo @ nuxt-issue-8014 copying yarn.lock inside dockerfile will probably solve the issue.
This should be resolved in the edge channel, or in the next RC.
Let me know if not and I’ll reopen.