apollo icon indicating copy to clipboard operation
apollo copied to clipboard

[ReferenceError]: define is not defined

Open harrytran998 opened this issue 5 years ago • 5 comments

Describe the bug I don't know why but when I upload to the version @vue/apollo-composable@^4.0.0-alpha.12, it's crash the app. Then I reproduce a repo to this issue.

image

To Reproduce Steps to reproduce the behavior:

  1. Clone this repo 'https://github.com/harrytran998/nuxt-ts-graphql-issues'
  2. Run yarn && yarn dev to see the issue

Expected behavior Hope you can fix that, my team risky to use this for production 🔥.

Versions

 "@nuxt/typescript-runtime": "^2.0.0",
  "@nuxtjs/apollo": "^4.0.1-rc.4",
  "@nuxtjs/composition-api": "^0.13.5",
  "@vue/apollo-composable": "^4.0.0-alpha.12",
  "apollo-cache-inmemory": "^1.6.6",
  "graphql": "^15.3.0",
  "nuxt": "^2.14.7",

Additional context Add any other context about the problem here.

harrytran998 avatar Oct 22 '20 07:10 harrytran998

Same error here as well

Petercopter avatar Oct 26 '20 21:10 Petercopter

Why was this issue closed? I am getting the same result

seanaye avatar Oct 30 '20 18:10 seanaye

@Petercopter and @seanaye this was a related issue that's still open and looks to be fixed soon: https://github.com/vuejs/vue-apollo/issues/1081

I just reverted back to @vue/[email protected] for now.

Hope this helps

toddheslin avatar Oct 30 '20 21:10 toddheslin

Any update or workarround on this issue ? I am using nuxt and I still have the issue.

The workarround provided in #1081 is only for jest.

leo91000 avatar Dec 31 '20 18:12 leo91000

Actually, this issue related to https://github.com/vuejs/vue-apollo/issues/1081. And like @toddheslin said, should use @vue/[email protected]. If anyone wants to use some new method, you can self-implement it = look for it in the code base.

harrytran998 avatar Jan 17 '21 02:01 harrytran998