vueuse / motion

๐Ÿคน Vue Composables putting your components in motion
https://motion.vueuse.org
MIT License
2.3k stars 80 forks source link

[ NUXT 2 - Bridge ] - Package subpath './nuxt' is not defined by "exports" in package.json #59

Closed Beethoven closed 2 years ago

Beethoven commented 2 years ago

Package subpath './nuxt' is not defined by "exports" in /node_modules/@vueuse/motion/package.json

iojanis commented 2 years ago

Same here in Nuxt 3

Edit: fixed by using "@vueuse/motion": "^2.0.0-beta.18" instead of "latest" which refers to "2.0.0-beta.12"

ndom91 commented 2 years ago

Having this issue as well with a greenfield Nuxt3 project. Installing the "latest" 2.0.0-beta.18 fixed it :+1:

cesswhite commented 2 years ago

Agree with this solution in Nuxt 3 "@vueuse/motion": "^2.0.0-beta.18" ๐Ÿ‘

hamedbaatour commented 2 years ago

anyone having issues installing @vueuse/motion with Nuxt 3 try the following

  1. create a .npmrc in the root of your project
  2. add the following to it:
    auto-install-peers=true
    legacy-peer-deps=true
  3. make sure your use the latest beta version in your package.json file which is "^2.0.0-beta.18" at the time of writing this.

    "dependencies": {
    "@vueuse/motion": "beta"
    }
    1. run npm i to install
    2. finally add @vueuse/motion/nuxt to the modules array in your nuxt.config.ts file just like this
      modules: ["@vueuse/nuxt", "@vueuse/motion/nuxt"],

    everything should work normally and you should not get any errors at this point. hope this helps!

Tahul commented 2 years ago

Hey here, really sorry about the late answer.

This won't happen again.

Could you try @vueuse/motion@2.0.0-beta.22 ?

Thank you a lot for providing workarounds in the meantime, @iojanis and @hamedbaatour. ๐Ÿ’š

Bryanoxx commented 2 years ago

Hi !

I just had the same bug by installing the latest tag version on Nuxt 3.0.0-rc.9, and by upgrading to the beta tag version: everything went well and the library now works perfectly ๐Ÿ”ฅ

Tahul commented 2 years ago

Closing this as it seem resolved!

Thank you so much for the quick feedback!

Feel free to re-open!