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

"Uncaught ReferenceError: require is not defined" when using nuxt-edge #159

Closed
Vlaoff opened this issue Sep 15, 2018 · 6 comments
Closed

Comments

@Vlaoff
Copy link

Vlaoff commented Sep 15, 2018

Version

v4.0.0-rc.2

Reproduction link

https://github.com/Vlaoff/apollonuxt

Steps to reproduce

I get the error when I launch nuxt and open it in the browser

What is expected ?

Babel should transpile the require

What is actually happening?

Babel keeps the require

Additional comments?

I think it's a problem with the babel 7/wepack 4 configuration.

It does not occur on nuxt 1.4.2, only on the nuxt-edge 2.0.0-xxx

I don't know if the problem is from @nuxtjs/apollo or nuxt.

This bug report is available on Nuxt community (#c139)
@Nainterceptor
Copy link

Same error here, but, as explained in referenced issue, npm i graphql to put version 14.0.2 seems to be a working work around.

@aldarund
Copy link
Contributor

@Vlaoff That should be fixed, could you try? ( delete lock file and reinstall)

@AndrewBogdanovTSS
Copy link
Contributor

Still not fixed. Reproduced with Nuxt v.2.0.0 and apollo v4.0.0-rc.2

@aldarund
Copy link
Contributor

Now its only fixed for vue-cli-plugin-apollo 0.17 while here its set as 0.16
https://github.com/nuxt-community/apollo-module/blob/master/package.json#L31
So a bump of vue-cli-plugin-apollo required
@dohomi

@rwuttke
Copy link

rwuttke commented Sep 27, 2018

And I think the same with graphql-tag, this uses graphql ^0.13.0, and upgrading to vue-cli-plugin-apollo uses graphql ^14.0.2.

So it looks like we need to wait for this one as well.

apollographql/graphql-tag#208

UPDATE: This has now been updated to graphql ^14.0.2, you need to get graphql-tag ^2.1.0

@dohomi
Copy link
Contributor

dohomi commented Oct 6, 2018

should be fixed with rc3

@dohomi dohomi closed this as completed Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants