kedro-org / kedro-viz

Visualise your Kedro data and machine-learning pipelines and track your experiments.
https://demo.kedro.org
Apache License 2.0
650 stars 107 forks source link

Development installation instructions don't work #1764

Open astrojuanlu opened 4 months ago

astrojuanlu commented 4 months ago

Description

As per title

Context

I was trying to send a PR

Steps to Reproduce

  1. micromamba create -n kedro-viz39-dev python=3.9 nodejs=18 -c conda-forge && micromamba activate kedro-viz39-dev
  2. npm install
  3. npm start

(Steps 2 and 3 as per https://github.com/kedro-org/kedro-viz/blob/main/CONTRIBUTING.md#development-guidelines)

Expected Result

This will serve the app at localhost:4141,

Actual Result


> @quantumblack/kedro-viz@7.1.0 start
> REACT_APP_DATA_SOURCE=$DATA npm-run-all -p start:app start:lib

> @quantumblack/kedro-viz@7.1.0 start:lib
> rm -rf lib && babel src --out-dir lib --copy-files --watch

> @quantumblack/kedro-viz@7.1.0 start:app
> PORT=4141 react-scripts start

There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "jest": "26.6.0"

Don't try to install it manually: your package manager does it automatically.
However, a different version of jest was detected higher up in the tree:

  /Users/juan_cano/Projects/QuantumBlackLabs/Kedro/kedro-viz/node_modules/jest (version: 29.7.0) 

Manually installing incompatible versions is known to cause hard-to-debug issues.

If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That will permanently disable this message but you might encounter other issues.

To fix the dependency tree, try following the steps below in the exact order:

  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
  2. Delete node_modules in your project folder.
  3. Remove "jest" from dependencies and/or devDependencies in the package.json file in your project folder.
  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:

  5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
     This may help because npm has known issues with package hoisting which may get resolved in future versions.

  6. Check if /Users/juan_cano/Projects/QuantumBlackLabs/Kedro/kedro-viz/node_modules/jest is outside your project directory.
     For example, you might have accidentally installed something in your home folder.

  7. Try running npm ls jest in your project folder.
     This will tell you which other package (apart from the expected react-scripts) installed jest.

If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
That would permanently disable this preflight check in case you want to proceed anyway.

P.S. We know this message is long but please read the steps above :-) We hope you find them helpful!

ERROR: "start:app" exited with 1.

I tried to follow the steps above:

  1. rm package-lock.json
  2. rm -r node_modules
  3. (No "jest" in package.json)
  4. npm install

And it actually worked.

Your Environment

Include as many relevant details as possible about the environment you experienced the bug in:

Checklist

astrojuanlu commented 4 months ago

The old react-scripts version is still blocking me, after applying the workaround I found #1278 again.

astrojuanlu commented 3 months ago

Progress! After #1854 this is mostly there. Now getting this:

Proxy error: Could not proxy request /api/main from localhost:4141 to http://localhost:4142/.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

Proxy error: Could not proxy request /api/package-compatibilities from localhost:4141 to http://localhost:4142/.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

Proxy error: Could not proxy request /graphql from localhost:4141 to http://localhost:4142/.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

Proxy error: Could not proxy request /api/main from localhost:4141 to http://localhost:4142/.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

Proxy error: Could not proxy request /api/package-compatibilities from localhost:4141 to http://localhost:4142/.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

Proxy error: Could not proxy request /graphql from localhost:4141 to http://localhost:4142/.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

image