Closed haayman-imagem closed 2 years ago
what is suprising here is that these message appear on the server, so apparently nuxt is trying to use localStorage on the server. I'm not surprised this doesn't work.
Tried to set localStorage:false in the configuration. Now the messages disappear, but the server hangs anyway
when I set ssr: false the problem goes away. Fine for me for now
Where can I set ssr false
in nuxt.config.js. At the toplevel
With last version of auth-module
and "@nuxt/bridge": "npm:@nuxt/bridge-edge@^3.0.0-27356801.e9128f3"
situation is the same :-(
in nuxt.config.js. At the toplevel Fine! It worked. But I would still like to solve this bug without ssr: false :-(
I've updated this issue to be exclusively about the warning in console and on the server. I agree that auth should not be trying to use localStorage in that scenario -- I'll have a look.
Continues to be an issue for me as well. It seems like it's nuxt-auth and not the browser. Like nuxt-auth is trying to ping the browser when ssr is on. I think it should be noted that even with localStorage option in nuxt.config auth, it still persists. But I'm sure you knew about both. Only option was to use somebodies suggestion and disable ssr... but kind of defeats the point of using Nuxt.
I've pushed a PR with a fix -- can someone please try it out and confirm it's working? https://github.com/nuxt-community/auth-module/pull/1430
I deleted node_modules and install and this is still warning is existing @bmulholland
alas. I did the same. I saw there was an update in package.json and used that ("@nuxtjs/auth-next": "^5.0.0-1642070881.71ddfdf",), deleted node_modules and reinstalled
There is one major improvement though: I only get 6 warnings and then it stops and the page is loaded. Yesterday the server wouldn't give a response.
I've pushed a PR with a fix -- can someone please try it out and confirm it's working? #1430
@haayman-imagem is correct. The server now starts and loads correctly, something that it was unable to do before. But the console warnings still persist. Though, step in the right direction, localStorage: false in the options seems to be working correctly and disables the errors (well, disables localStorage)
I've pushed a PR with a fix -- can someone please try it out and confirm it's working? #1430
@haayman-imagem is correct. The server now starts and loads correctly, something that it was unable to do before. But the console warnings still persist. Though, step in the right direction, localStorage: false in the options seems to be working correctly and disables the errors (well, disables localStorage)
but that would probably also disable localStorage in the client?
You can't test the PR from npm, since it's not merged, so just deleting package.json or node_modules and re-installing would not be sufficient. You'd have to use the git branch directly, which I'm guessing none of you did?
In any case, I just remembered that it's a pain to refer specifically to the raw git repo due to the way the package is built, so I'll just merge it.
Please let me know if it's fixed
Seems to be fixed! 👍
Seems to be fixed! 👍
My comment was while using auth-next#b8697ab. I had the same idea that they might be using outdated code, but I edited my message when I figured out how to pull a specific branch.
My comment was while using auth-next#b8697ab
Yeah, probably because you have to build it with a magic incantation :(
Thanks for everyone's help and patience here -- glad we got it fixed.
My comment was while using auth-next#b8697ab
Yeah, probably because you have to build it with a magic incantation :(
Thanks for everyone's help and patience here -- glad we got it fixed.
The #b8 is the sha hash of your branch. tbh didn't know you could do that, but I checked and the changed code was there so idk. But the full release seems to be working as intended. tyvm
Version
module: ^5.0.0-1641800591.39ceedf nuxt: @2.0.0
Nuxt configuration
mode:
What is expected?
no error message
What is actually happening?
The screen keeps saying
Additional information
Checklist
Steps to reproduce
$ npx create-nuxt-app oauth2-nuxt choose minimal options
$ npm install @nuxtjs/auth-next @nuxtjs/axios axios
$ npm run dev
access localhost:3000 from chrome
P.S. While writing this message I kept nuxt running and it just dumped