cli icon indicating copy to clipboard operation
cli copied to clipboard

npx auth secret: No Framework detected error

Open souravpurkait360 opened this issue 1 year ago • 3 comments

Environment

System: OS: macOS 15.0 CPU: (8) arm64 Apple M1 Memory: 113.38 MB / 8.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 23.4.0 - ~/.nvm/versions/node/v23.4.0/bin/node Yarn: 1.22.22 - ~/.nvm/versions/node/v23.4.0/bin/yarn npm: 10.9.2 - ~/.nvm/versions/node/v23.4.0/bin/npm Browsers: Chrome: 131.0.6778.140 Safari: 18.0 npmPackages: next: 15.1.0 => 15.1.0 next-auth: ^4.24.11 => 4.24.11 react: 19.0.0 => 19.0.0

Describe the issue

I am still getting this error.

npx auth@latest secret
Need to install the following packages:
[email protected]
Ok to proceed? (y) y

Multiple supported frameworks detected: next, express
No framework detected. Currently supported frameworks are: next, sveltekit, expres

Anyone else facing this? I have installed:

"next": "15.1.0",
"next-auth": "^5.0.0-beta.25",

My node version is

23.4.0

I tried deleting all node modules, clearing yarn cache and then reinstalling everything. But still facing same error. There were already one closed issue exists but solution npx auth@latest secret is not working. Its not solving the problem and giving same error.

Please help!

How to reproduce

Run npx auth secret or npx auth@latest secret You will see error

Multiple supported frameworks detected: next, express
No framework detected. Currently supported frameworks are: next, sveltekit, express

Expected behavior

The auth key should be generated and added to env file without any error.

souravpurkait360 avatar Dec 19 '24 02:12 souravpurkait360

I faced the same problem, I tried uninstalling express first, then running the npx auth secret again, then it finally worked. After the secret was generated I reinstalled express.

thethirdswan avatar Dec 27 '24 08:12 thethirdswan

I am having the same error message but I am building a qwik app. I really need to set up authentication for this app so if you can give me a north on how to solve it or an workaround I really appreciate it.

DmoraDev avatar Jul 04 '25 03:07 DmoraDev

Try with npx auth@latest secret at the root of your project.

mattborghi avatar Aug 09 '25 20:08 mattborghi