pizzooid / explorer-and-cyberconnected-dapps

This is for Gitcoin 2022 Schelling Point CyberConnect Team Submission Repo
https://cyberconnected-explorer.netlify.app/
0 stars 3 forks source link

Fix Bug when running yarn test #7

Open pizzooid opened 2 years ago

pizzooid commented 2 years ago

yarn test gives an error

Qoyyuum commented 2 years ago

Can you share the error message?

Qoyyuum commented 2 years ago

I ran yarn test and I got an error as well.

 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export * from "d3-array";
                                                                                      ^^^^^^

    SyntaxError: Unexpected token 'export'

      1 | import React from 'react';
    > 2 | import * as d3 from "d3";
        | ^
      3 |
      4 | class NetworkGraph extends React.Component {
      5 |     constructor(props) {

      at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1728:14)
      at Object.<anonymous> (src/NetworkGraph.js:2:1)

So the bug seems to be d3 related (unless you are referring a different error?).

An answer from stackoverflow suggests to downgrade but I would advise against it. StackOverflow answer

I'll help investigate but this should be a low priority thing to tackle.

pizzooid commented 2 years ago

I agree