device
device copied to clipboard
[Help needed] Nuxt 3 support
This is my first module so probably something isn't correct, I ported the device module to Nuxt 3 by rewriting it from scratch using the old code and the module starter from CLI, it should behave like the old one.
What's missing:
- Tests
- Publication workflow
- ~~Nuxt 2/Bridge support~~ (Marked as supported, needs to be tested) (^ I don't have experience with these ^)
- New readme information
Hi,
When I pull your code the only thing that get pulled is README.md, package.json and LICENSE

I've tried with:
npm install git+https://github.com/Redemption198/device-module#master
npm install nuxt-community/device-module#pull/119/head:master (and variations without the head part)
also pulled the original @nuxt/device and then tried git fetch origin pull/119/head:master in it
but all with the same result
Any idea how to get all files?
Thank you!
Hi,
When I pull your code the only thing that get pulled is
README.md,package.jsonandLICENSE
I've tried with:
npm install git+https://github.com/Redemption198/device-module#master
npm install nuxt-community/device-module#pull/119/head:master(and variations without the head part)also pulled the original
@nuxt/deviceand then triedgit fetch origin pull/119/head:masterin itbut all with the same result
Any idea how to get all files?
Thank you!
Nothing appears because the module usually is built and uploaded to npm so the build files are ignored by Git. I built the module and temporarily included the build files, if you install it again it should work.
~~TypeScript autocomplete seems to not be working currently (inside the module playground it did) everything else should work fine.~~
Update: TypeScript autocomplete works with the latest commit.
Would love to see this merged in as a next branch. There is a need for the module to be production-ready for Nuxt 3.
This module will need an update to work with Nuxt 3 rc-9 and above. Currently in 3.0.0-rc.9 it gives the following error:
WARN Module device-module is disabled due to incompatibility issues: [nuxt] Nuxt version `^3.0.0 || ^2.16.0` is required but currently using '3.0.0-rc.9'
This is due to https://github.com/nuxt/framework/pull/7116
This module will need an update to work with Nuxt 3 rc-9 and above. Currently in 3.0.0-rc.9 it gives the following error:
WARN Module device-module is disabled due to incompatibility issues: [nuxt] Nuxt version `^3.0.0 || ^2.16.0` is required but currently using '3.0.0-rc.9'This is due to nuxt/framework#7116
Thanks for the solution, the module has been updated to RC9.
+1 for releasing this under a next branch
Thank you for your PR! π
cc @danielroe, would really like to have your opinion on the PR too βΊοΈ
Regarding tests: I suppose that Nuxt's test-utils will come in handy - but I am not sure how easy it will be to "fake" the user agent for tests π
Regarding tests: I suppose that Nuxt's test-utils will come in handy - but I am not sure how easy it will be to "fake" the user agent for tests see_no_evil
I found a way to recreate the old tests with Nuxt test utils, it isn't elegant but seems to be working.
LGTM! cc @dotneet
@Redemption198 Thank you for your great work!
@Redemption198 3.0.0 has been released to npm!
@Redemption198 3.0.0 has been released to npm!
Nice!