antvis / antvis/Graphin

Running Development Server for Contribution Help

Open
#411 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.1k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

### 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](https://github.com/antvis/Graphin/blob/master/packages/graphin-components/package.json#L57) 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 ^^^^](https://github.com/antvis/Graphin/blob/f4a2a088d467ef37bc83f8d4badeafa98d32f555/packages/graphin/docs/contributing.en-US.md#L62)

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](https://user-images.githubusercontent.com/6743796/180617358-7c6b336f-c39a-4071-b4a7-9f3655a63d8e.png)

### 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 ()
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 ()
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_

Contributor guide

Open the contributing guide

Research direction

Start with the root package.json, packages/graphin/package.json, packages/graphin-components/package.json, and packages/graphin/docs/contributing.en-US.md. Reproduce the issue with yarn and yarn run docs, then trace the missing @antv/graphin-icons/dist/index.css imports in packages/graphin-icons/src/demos/index.tsx and the graph-database example. Done means the docs server builds and the contribution instructions match the available commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.