module: 5.0.0-1616003482.75c20e6
nuxt: 2.15.4
yarn add --exact @nuxtjs/auth-next and nuxt config add, yarn dev

[x] I have tested with the latest module version and the issue still occurs
WARN in ./node_modules/hasha/index.js
Module not found: Error: Can't resolve 'worker_threads' in '/a/node_modules/hasha'
This dependency was not found:
axios.ts change algoritma and fixed. Interesting :D
Did you find Solving?
Having the same issue.
Same issue here too. I want at least a workaround.
I tried to add a custom scheme. As long as the new file is empty, it does not show an error, but once I imported LocalScheme from '@nuxtjs/auth-next', it shows an error. Any idea how to resolve it? @productfrontenddeveloper
Hi @TonalidadeHidrica! Can you open a new issue with more info about this issue you're facing, your auth config and some reproduction steps? Also, if you could make a repro in CodeSandbox using this template would be awesome, it would help me a lot! Thank you in advance :)
@JoaoPedroAS51 Thank you for your offer! After struggling for hours I found out the actual cause, which I will describe below.
I was trying to define a custom scheme extending LocalScheme. In schemes/myCustomScheme.ts I wrote the following import statement:
import { LocalScheme } from '@nuxtjs/auth-next'
export default class MyCustomScheme extends LocalScheme {
// ...
}
This caused the following error message to be output in the nuxt dev console:
WARN in ./node_modules/hasha/index.js
Module not found: Error: Can't resolve 'worker_threads' in '/a/node_modules/hasha'
This dependency was not found:
- fs in ./node_modules/@nuxtjs/auth-next/dist/module.js, ./node_modules/hasha/index.js
The culprit was the import statement. As written in official docs, and pointed out clearly in this issue comment (which definitely saved my day, thanks!), I MUST have import from ~auth/runtime instead:
import { LocalScheme } from '~auth/runtime'
Once I replaced the import statement, everything started to work fine. So in my case, that was the reason.
Again, thank you for helping me out! @JoaoPedroAS51
For those who are having trouble with this issue, I hope this information would help! @maggi08 @BtheGit
Thanks for sharing the solution here. I'm happy to know it's working now! :)
If nothings works, try to upgrade your @nuxtjs/auth-next.
import {LocalScheme} from '~auth/runtime' is now working for me.