vueuse / motion

šŸ¤¹ Vue Composables putting your components in motion

Home Page:https://motion.vueuse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] Could not find a declaration file for module '@vueuse/motion'.

polarove opened this issue Ā· comments

What happened?
Could not find a declaration file for module '@vueuse/motion'.

Error message

  1. 'c:/projects/project-name/node_modules/@vueuse/motion/dist/index.mjs' implicitly has an 'any' type.
  2. There are types at 'c:/projects/project-name/node_modules/@vueuse/motion/dist/index.d.ts',
  3. but this result could not be resolved when respecting package.json "exports".

Tips
The '@vueuse/motion' library may need to update its package.json or typings.

package manager: yarn

Still present.

Could not find a declaration file for module '@vueuse/motion'. 'node_modules/.pnpm/@vueuse+motion@2.0.0_vue@3.3.10/node_modules/@vueuse/motion/dist/index.mjs' implicitly has an 'any' type.
  There are types at 'node_modules/@vueuse/motion/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@vueuse/motion' library may need to update its package.json or typings.

They already fixed this, but didn't create a new tag. The error will persist until a new version tag is created. A workaround is add "type" on exports inside your node_modules:

  "exports": {
    ".": {
+      "types": "./dist/index.d.ts",
      "require": "./dist/index.cjs",
      "import": "./dist/index.mjs"
    },
    "./nuxt": {
+      "types": "./dist/nuxt.d.ts",
      "require": "./dist/nuxt.cjs",
      "import": "./dist/nuxt.mjs"
    }
  },

Indeed, a 2.0.1 patch should be made and released. However you should be able to use the master branch in npm using npm install "https://github.com/vueuse/motion.git#main" --save

Is there something blocking a 2.0.1 patch release here? Can we help?