kedro-viz
kedro-viz copied to clipboard
Development installation instructions don't work
Description
As per title
Context
I was trying to send a PR
Steps to Reproduce
micromamba create -n kedro-viz39-dev python=3.9 nodejs=18 -c conda-forge && micromamba activate kedro-viz39-devnpm installnpm 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/[email protected] start
> REACT_APP_DATA_SOURCE=$DATA npm-run-all -p start:app start:lib
> @quantumblack/[email protected] start:lib
> rm -rf lib && babel src --out-dir lib --copy-files --watch
> @quantumblack/[email protected] 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:
rm package-lock.jsonrm -r node_modules- (No
"jest"inpackage.json) npm install
And it actually worked.
Your Environment
Include as many relevant details as possible about the environment you experienced the bug in:
- Web browser system and version:
- Operating system and version:
- NodeJS version used (if relevant): 18.19.0
- Kedro version used (if relevant):
- Python version used (if relevant):
Checklist
- [ ] Include labels so that we can categorise your issue
The old react-scripts version is still blocking me, after applying the workaround I found #1278 again.
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).
I can't reproduce my original error @SajidAlamQB 😅 and my follow-up comment is about me not launching the backend, only the frontend. I think we can safely close this.