Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not resolve "@vue/composition-api/dist/vue-composition-api.esm.js" in @vue/apollo-composable #1263

Closed
masterkain opened this issue Sep 21, 2021 · 2 comments

Comments

@masterkain
Copy link

masterkain commented Sep 21, 2021

not sure what happened but since f4e2a14

in a vue 3 project I get:

dashboard_1         |  > node_modules/vue-demi/lib/index.mjs:2:30: error: Could not resolve "@vue/composition-api/dist/vue-composition-api.esm.js" (mark it as external to exclude it from the bundle)
dashboard_1         |     2 │ ...sitionAPI from '@vue/composition-api/dist/vue-composition-api.esm.js'
dashboard_1         |       ╵                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dashboard_1         |
dashboard_1         | error when starting dev server:
dashboard_1         | Error: Build failed with 1 error:
dashboard_1         | node_modules/vue-demi/lib/index.mjs:2:30: error: Could not resolve "@vue/composition-api/dist/vue-composition-api.esm.js" (mark it as external to exclude it from the bundle)
dashboard_1         |     at failureErrorWithLog (/usr/src/app/node_modules/esbuild/lib/main.js:1478:15)
dashboard_1         |     at /usr/src/app/node_modules/esbuild/lib/main.js:1136:28
dashboard_1         |     at runOnEndCallbacks (/usr/src/app/node_modules/esbuild/lib/main.js:926:63)
dashboard_1         |     at buildResponseToResult (/usr/src/app/node_modules/esbuild/lib/main.js:1134:7)
dashboard_1         |     at /usr/src/app/node_modules/esbuild/lib/main.js:1243:14
dashboard_1         |     at /usr/src/app/node_modules/esbuild/lib/main.js:614:9
dashboard_1         |     at handleIncomingPacket (/usr/src/app/node_modules/esbuild/lib/main.js:711:9)
dashboard_1         |     at Socket.readFromStdout (/usr/src/app/node_modules/esbuild/lib/main.js:581:7)
dashboard_1         |     at Socket.emit (node:events:394:28)
dashboard_1         |     at Socket.emit (node:domain:475:12)
dashboard_1         | error Command failed with exit code 1.
"@apollo/client": "^3.4.13",
"@vue/apollo-composable": "^4.0.0-alpha.14",
"@vue/apollo-util": "^4.0.0-alpha.14",
"vue": "^3.2.13",


"@vue/apollo-composable@^4.0.0-alpha.14":
  version "4.0.0-alpha.15"
  resolved "https://registry.yarnpkg.com/@vue/apollo-composable/-/apollo-composable-4.0.0-alpha.15.tgz#4a93417cb112cc1ad9c8fbdf47008909f71fca5b"
  integrity sha512-c/xk/po4nTcAnwIG+ZK0XFwY84BiKJquGnK2T+qolp0Saeb5amoTtHu6CEZ6Xd635otqUTY8SODOoFraoAttNQ==
  dependencies:
    throttle-debounce "^3.0.1"
    ts-essentials "^8.1.0"
    vue-demi "^0.11.4"
@masterkain
Copy link
Author

vueuse/vue-demi@98185ab

@masterkain
Copy link
Author

maybe we need to add peerDependencies in package.json as per vue-demi readme?

{
  "dependencies": {
    "vue-demi": "latest"
  },
  "peerDependencies": {
    "@vue/composition-api": "^1.0.0-rc.1",
    "vue": "^2.0.0 || >=3.0.0"
  },
  "peerDependenciesMeta": {
    "@vue/composition-api": {
      "optional": true
    }
  },
  "devDependencies": {
    "vue": "^3.0.0" // or "^2.6.0" base on your preferred working environment
  },
}

vueuse/vue-demi#79 (comment)

@masterkain masterkain changed the title Could not resolve "@vue/composition-api/dist/vue-composition-api.esm.js" Could not resolve "@vue/composition-api/dist/vue-composition-api.esm.js" in @vue/apollo-composable Sep 21, 2021
@Akryum Akryum closed this as completed in 3c8545b Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant