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

next-auth authorization-url.js file not found during build #941

Open
shadowmimosa opened this issue Nov 7, 2024 · 2 comments
Open

next-auth authorization-url.js file not found during build #941

shadowmimosa opened this issue Nov 7, 2024 · 2 comments
Labels
question A question about NuxtAuth

Comments

@shadowmimosa
Copy link

Environment

Nuxt project info: 15:38:38


  • Operating System: Windows_NT
  • Node Version: v21.4.0
  • Nuxt Version: 3.14.159
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: compatibilityDate, devServer, devtools, modules, extends, css, auth, imports, build, runtimeConfig
  • Runtime Modules: @pinia/[email protected], @nuxt/[email protected], @sidebase/[email protected]
  • Build Modules: -

Reproduction

Not yet

Describe the bug

When building the Nuxt 3 project with @sidebase/nuxt-auth and [email protected], encountering a file not found error for the authorization-url.js file.

ERROR  ENOENT: no such file or directory, realpath '/Users/Phoenix/Documents/Repos/DDCloud/sales-lead-management/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected][email protected][email protected]___ko5kluscrg5ldlgwp7mzwyhtjm/node_modules/next-auth/core/lib/oauth/authorization-url.js'

Current Configuration

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@sidebase/nuxt-auth'],
  auth: {
    provider: {
      type: 'authjs',
      addDefaultCallbackUrl: true
    },
    globalAppMiddleware: true
  }
})

Steps to Reproduce
Install dependencies with pnpm
Run pnpm build
Error occurs during the build process
Expected Behavior
The build should complete successfully without any file not found errors.
Additional Context
Using pnpm as package manager
The error seems to be related to the next-auth oauth file path resolution
This issue occurs consistently on build
Attempted Solutions
Cleaned node_modules and reinstalled dependencies
Cleared Nuxt cache
Reinstalled next-auth with specific version 4.21.1
Would appreciate any guidance on resolving this issue.

Additional context

No response

Logs

No response

@shadowmimosa shadowmimosa added bug A bug that needs to be resolved pending An issue waiting for triage labels Nov 7, 2024
@phoenix-ru
Copy link
Collaborator

You are probably getting an error due to pnpm:
nuxt/nuxt#14146

Can you show your .npmrc (only interested in shamefully-hoist option)?

@phoenix-ru phoenix-ru added question A question about NuxtAuth and removed bug A bug that needs to be resolved pending An issue waiting for triage labels Nov 7, 2024
@shadowmimosa
Copy link
Author

Thank you for your response!

I don't have an .npmrc file locally, so I just created one and added the following setting:

shamefully-hoist=true

However, this did not resolve the issue. The command still does not produce any output or create the project.

Is there anything else I can try to troubleshoot this, or any other configurations I may need to set in the .npmrc file?

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

No branches or pull requests

2 participants