Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use Nextra with Nx -- based on #22515 #28490

Open
4 tasks
jonasschultheiss opened this issue Oct 17, 2024 · 0 comments
Open
4 tasks

Can't use Nextra with Nx -- based on #22515 #28490

jonasschultheiss opened this issue Oct 17, 2024 · 0 comments

Comments

@jonasschultheiss
Copy link

Current Behavior

Adding Nextra to Nx makes it so that Nx is unable to build the dependency graph without the hack described in the original issue (#22515).

Expected Behavior

Be able to migrate my turbo, next, nextra monorepo to Nx.

GitHub Repo

No response

Steps to Reproduce

See the original issue (#22515)

Nx Report

Node : 22.9.0
OS : darwin-arm64
Native Target : aarch64-macos
pnpm : 9.12.2

nx (global) : 20.0.1
nx : 20.0.1
@nx/eslint : 20.0.1
@nx/next : 20.0.1
typescript : 5.6.3

Registered Plugins:
@nx/next/plugin
@nx/eslint/plugin

⚠️ Unable to construct project graph.
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.

Failure Logs

  An error occurred while processing files for the @nx/next/plugin plugin.
- apps/docs/next.config.mjs: > Couldn't find any `pages` or `app` directory. Please create one under the project root
  Error: > Couldn't find any `pages` or `app` directory. Please create one under the project root
      at Module.findPagesDir (/Users/jonasschultheiss/project_dir/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/next/dist/lib/find-pages-dir.js:42:15)
      at findPagesDirectory (file:///Users/jonasschultheiss/project_dir/node_modules/.pnpm/[email protected]_@[email protected][email protected]_@[email protected][email protected][email protected]_6ne7gbb66ylnuww3p3l6vuytre/node_modules/nextra/dist/server/file-system.js:4:28)
      at file:///Users/jonasschultheiss/project_dir/node_modules/.pnpm/[email protected]_@[email protected][email protected]_@[email protected][email protected][email protected]_6ne7gbb66ylnuww3p3l6vuytre/node_modules/nextra/dist/server/file-system.js:10:19
      at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
      at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
      at async load (/Users/jonasschultheiss/project_dir/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nx/devkit/src/utils/config-utils.js:82:20)
      at async loadConfigFile (/Users/jonasschultheiss/project_dir/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nx/devkit/src/utils/config-utils.js:36:22)
      at async buildNextTargets (/Users/jonasschultheiss/project_dir/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@zkochan+js-ya_vldoolhpypydphnr55gp6jdxua/node_modules/@nx/next/src/plugins/plugin.js:53:24)
      at async exports.createNodes (/Users/jonasschultheiss/project_dir/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected]_@zkochan+js-ya_vldoolhpypydphnr55gp6jdxua/node_modules/@nx/next/src/plugins/plugin.js:41:32)
      at async /Users/jonasschultheiss/project_dir/node_modules/.pnpm/[email protected]/node_modules/nx/src/project-graph/plugins/utils.js:10:27

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

The dirty fix works, but is unmaintainable. i dont want a random folder in my monorepo, just because I'm using nextra.
A Nx dev responded saying it's fixed, but didn't mention a release, pr or commit -> how is it fixed? is it really?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant