simpletut / Universal-React-Apollo-Registration

Open Source Universal User Registration System – NodeJS React Apollo GraphQL JWT MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Babel 7 errors...

marksmithjobapps opened this issue · comments

Hello,

Firstly thanks for your work - I am new to Node and thought your project would be a perfect place to start.

I've followed the instructions and the app builds and runs however none of the buttons work...

On running npm test - all tests fail and I get the message below for each of the 18 tests:

Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel. (While processing preset: "C:\Users\Mark\Desktop\Universal-React-Apollo-Registration\node_modules\@babel\preset-env\lib\index.js")

I've upgraded my version of babel to v 7.0.0 via npm but I still get the same errors...

I am very new to node so may be doing something wrong but I would have thought that cloning the repo, running npm install and the other commands from the instructions given would have resulted in a working application or at least the correct components...

Am I wrong in thinking this? - I am new and still haven't got my head around how npm and other package managers work - and to be honest they all seem as flaky as hell... maybe that's because I don't understand them well enough yet...

Can you point me in the right direction - I would think that other newbies may run into the same issue and it would be a shame for them not to use this after the hard work you must have put into it...

Thanks

To add to the above, I downloaded the previous version and ran the install and build process using Yarn - these completed as needed and the Jest test also passed however when I run the app, none of the buttons work in terms of being able to submit any data, for example at the user sign up screen - on opening chrome dev tools - I see the following error in the console:

instanceOf.mjs:34 Uncaught ReferenceError: require is not defined
at eval (instanceOf.mjs:34)
at Module../node_modules/graphql/jsutils/instanceOf.mjs (client_bundle.js:6589)
at webpack_require (client_bundle.js:20)
at eval (definition.mjs:46)
at Module../node_modules/graphql/type/definition.mjs (client_bundle.js:6913)
at webpack_require (client_bundle.js:20)
at eval (validate.mjs:4)
at Module../node_modules/graphql/type/validate.mjs (client_bundle.js:6985)
at webpack_require (client_bundle.js:20)
at eval (graphql.mjs:4)

and if I click on the instanceOf.mjs:34, link I see the below in the instanceOf.mjs file...

/**

  • A replacement for instanceof which includes an error warning when multi-realm
  • constructors are detected.
    /
    /
    WEBPACK VAR INJECTION */}.call(this, require("./../../process/browser.js"))) # <--- uncaught reference error require is not defined

Is this likely to be a problem on my local machine?

Thank you for bringing this to my attention.

It was a GraphQL dependency issue. Please get latest.