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

Running Development Server for Contribution Help #411

Open
cliffordfajardo opened this issue Jul 23, 2022 · 2 comments
Open

Running Development Server for Contribution Help #411

cliffordfajardo opened this issue Jul 23, 2022 · 2 comments

Comments

@cliffordfajardo
Copy link

cliffordfajardo commented Jul 23, 2022

Describe the bug

I am trying to run the graphin app locally to experiment with some changes, however I am running into build errors

Goal

My goal is to upgrade the the "@antv/g6" dependency inside graphin package.json file and verify the code works by running the /docs folder. G6 has had quite a few updates recently, particularly related to Combos and performance; would be good to pick up those changes in Graphin

Questions

I was confused about the contributing instructions, particular this part:

⚠️ Special attention
Before installing the dependencies of each package, you need to do a special treatment in graphin-components, move the graphin dependencies in package.json from peerDependencies to dependencies, so that you can run bootstrap in npm run bootstrap, you can link to the dependency. The source code needs to be such in order to publish, it needs to be changed to the following (this operation is only in Used when installing dependencies for the first time)
Docs URL ^^^^

  1. I don't see a bootstrap command in the root's package.json file
  2. I am also not sure what is meant by the following statement: "move the graphin dependencies in package.json from peerDependencies to dependencies". I think these changes are already present? Are these instructions out of date

Steps to Reproduce the Bug or Issue

  1. Clone a fresh repository of graphin
  2. run yarn at the root of the repository to install dependencies
  3. run yarn run boostrap ci: which runs the lerna boostrap command per the package.json at the root.
  4. In terminal 1 (inside graphin folder): yarn run graphin) ... now graphin dev server is watching for changes
  5. In terminal 2 (inside root) : yarn run docs to run the docs website to test my changes; however I'm getting errors
    CleanShot 2022-07-23 at 10 59 51@2x

Expected behavior

I was expecting the docs site to work however, I'm getting build errors:

Stack trace
yarn run docs
yarn run v1.22.10
$ NODE_OPTIONS=--max_old_space_size=4098 && dumi dev
Starting the development server...
ERROR [dumi]: cannot resolve module @antv/graphin-icons/dist/index.css from /Users/cfajardo/Repos/Graphin/packages/graphin/docs/solution/graph-database/large-graph/utils.ts
ERROR [dumi]: cannot resolve module @antv/graphin-icons/dist/index.css from /Users/cfajardo/Repos/Graphin/packages/graphin/docs/solution/graph-database/large-graph/utils.ts
ERROR [dumi]: cannot resolve module @antv/graphin-icons/dist/index.css from /Users/cfajardo/Repos/Graphin/packages/graphin-icons/src/demos/index.tsx
ERROR [dumi]: cannot resolve module @antv/graphin-icons/dist/index.css from /Users/cfajardo/Repos/Graphin/packages/graphin-icons/src/demos/index.tsx

● Client █████████████████████████ building (70%) 3885/3885 modules 0 active
 

✖ Server
  Compiled with some errors in 1.24m

 ERROR  Failed to compile with 2 errors                                                                                                   10:51:51 AM

This dependency was not found:

* @antv/graphin-icons/dist/index.css in ./packages/graphin-icons/src/demos/index.tsx, ./packages/graphin/docs/solution/graph-database/large-graph/utils.ts

To install it, you can run: npm install --save @antv/graphin-icons/dist/index.css

✖ Client
  Compiled with some errors in 1.47m

✖ Server
  Compiled with some errors in 1.24m

 ERROR  Failed to compile with 2 errors                                                                                                   10:52:04 AM

This dependency was not found:

* @antv/graphin-icons/dist/index.css in ./packages/graphin-icons/src/demos/index.tsx, ./packages/graphin/docs/solution/graph-database/large-graph/utils.ts

To install it, you can run: npm install --save @antv/graphin-icons/dist/index.css
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

AssertionError [ERR_ASSERTION]: chunk of umi not found.
    at /Users/cfajardo/Repos/Graphin/node_modules/umi/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:104:27
    at Array.forEach (<anonymous>)
    at chunksToFiles (/Users/cfajardo/Repos/Graphin/node_modules/umi/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:93:14)
    at /Users/cfajardo/Repos/Graphin/node_modules/umi/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:189:32
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/cfajardo/Repos/Graphin/node_modules/umi/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:62:103)
    at _next (/Users/cfajardo/Repos/Graphin/node_modules/umi/node_modules/@umijs/preset-built-in/lib/plugins/commands/htmlUtils.js:64:194)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: undefined,
  expected: true,
  operator: '=='
}

Platform

  • OS: MacOS
  • Browser: Google Chrome latest

Additional context

No response

@cliffordfajardo
Copy link
Author

cliffordfajardo commented Jul 23, 2022

I was able to get the docs site running, however, I am not seeing @antv/g6 update after changing the value in my package.json.

Steps I took

  1. Run yarn at the root
  2. Update @antv/g6 inside of graphin's package.json to "@antv/g6": "^4.6.15".
  3. In a new terminal tab for each of the following (graphin, graphin-icons, graphin-components) I ran yarn && yarn start inside each package
  4. run yarn docs at the root
  5. in the javascript dev console typed G6 to see the version on the global object. Seeing '4.6.4' but expecting 4.6.15, which is the latest version on npm

CleanShot 2022-07-23 at 14 12 19@2x

@pomelo-nwu -can you try

  • updating "@antv/g6" to version 4.6.15?
  • updating @antv/util to 3.2.2?
    • should be safe to update this package, as all the methods used in this repo still exist in @antv/util

@cliffordfajardo
Copy link
Author

CC @pomelo-nwu - upgraded dependencies

Would be good to try out locally on your computer.
I had trouble running it locally earlier today: #411

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