Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

vue-composition-api.mjs not found #13

Closed
frans-vectra opened this issue Nov 4, 2021 · 0 comments
Closed

vue-composition-api.mjs not found #13

frans-vectra opened this issue Nov 4, 2021 · 0 comments

Comments

@frans-vectra
Copy link

Recently I'm getting the following error when running the project;

Module not found: Error: Can't resolve '@vue/composition-api/dist/vue-composition-api.mjs' in '{project dir}/node_modules/vue-demi/lib'

It seems like its related to the recent v0.12.0 release of the vue-demi package. Some related issues:

I found the following workaround, but I'm not sure that this is the correct resolution to this issue.

Add the following to nuxt.config.js:

import { resolve } from 'path'
...

export default {
  ...
  alias: {
    '@vue/composition-api/dist/vue-composition-api.mjs': resolve('./node_modules/@vue/composition-api/dist/vue-composition-api.esm.js'),
  },
  ...
}
@bloodf bloodf closed this as completed Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants