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

Follow contributing guide result in error #2047

Open
noklam opened this issue Aug 19, 2024 · 2 comments
Open

Follow contributing guide result in error #2047

noklam opened this issue Aug 19, 2024 · 2 comments
Assignees

Comments

@noklam
Copy link
Contributor

noklam commented Aug 19, 2024

Description

Short description of the problem here.
I try to build kedro-viz locally and follow the contributing guide. I found that I am missing index.html because I didn't run build.

Steps to Reproduce

  1. make build

(kedro) Nok_Lam_Chan@ kedro-viz % npm run build

@quantumblack/kedro-viz@9.2.0 build
cross-env GENERATE_SOURCEMAP=false react-scripts build

I need to run this first:

npm install --global cross-env

to fix the issue. Then I get stuck in another error and I am not able to resolve:
(kedro) Nok_Lam_Chan@ kedro-viz % make build
rm -rf build package/build package/dist package/kedro_viz/html pip-wheel-metadata package/kedro_viz.egg-info
npm run build

@quantumblack/kedro-viz@9.2.0 build
cross-env GENERATE_SOURCEMAP=false react-scripts build

node:events:496
throw er; // Unhandled 'error' event
^

Error: spawn react-scripts ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:292:12)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn react-scripts',
path: 'react-scripts',
spawnargs: [ 'build' ]
}

@ravi-kumar-pilla
Copy link
Contributor

Hi @noklam , thanks for raising this issue. This mostly happens due to the conflicting node versions, stale package.lock.json and node_modules. We can add a NOTE in the CONTRIBUTING.md file like below -

Note

If you face any issues running make build, please note that we recommend you install Node v18, remove node_modules from the working directory and delete package-lock.json. Now try installing node dependencies using
npm install and execute make build again.

cc: @jitu5

Thank you

@rashidakanchwala
Copy link
Contributor

Also this ticket is mentioned here #1764

@SajidAlamQB SajidAlamQB self-assigned this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Review
Development

No branches or pull requests

4 participants