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

React dependency installation error #466

Closed
Superskyyy opened this issue Dec 20, 2024 · 4 comments · Fixed by #471
Closed

React dependency installation error #466

Superskyyy opened this issue Dec 20, 2024 · 4 comments · Fixed by #471
Assignees

Comments

@Superskyyy
Copy link

When running the command npx create-llama@latest

Known workaround is to issue npm config set legacy-peer-deps true

Starting development servers

Installing frontend dependencies using npm. It might take a while...
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"19.0.0-rc-66855b96-20241106" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0" from [email protected]
npm error node_modules/next
npm error   next@"^15.0.3" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/ubuntu/.npm/_logs/2024-12-20T02_27_23_332Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2024-12-20T02_27_23_332Z-debug-0.log
Traceback (most recent call last):
  File "/home/ubuntu/Synthetic/my-app/run.py", line 75, in start_development_servers
    frontend_process, frontend_port = await _run_frontend()
                                      ^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/Synthetic/my-app/run.py", line 141, in _run_frontend
    _install_frontend_dependencies()
  File "/home/ubuntu/Synthetic/my-app/run.py", line 199, in _install_frontend_dependencies
    run([package_manager, "install"], cwd=".frontend", check=True)
  File "/home/ubuntu/.pyenv/versions/3.12.8/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/ubuntu/.nvm/versions/node/v23.4.0/bin/npm', 'install']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ubuntu/Synthetic/my-app/run.py", line 55, in dev
    asyncio.run(start_development_servers())
  File "/home/ubuntu/.pyenv/versions/3.12.8/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.pyenv/versions/3.12.8/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.pyenv/versions/3.12.8/lib/python3.12/asyncio/base_events.py", line 686, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/ubuntu/Synthetic/my-app/run.py", line 105, in start_development_servers
    raise SystemError(f"Failed to start development servers: {str(e)}") from e
SystemError: Failed to start development servers: Command '['/home/ubuntu/.nvm/versions/node/v23.4.0/bin/npm', 'install']' returned non-zero exit status 1.
Child process exited with code=1
Failed to run app: 1

Aborting installation.
Unexpected error. Please report it as a bug:
 1
@Superskyyy
Copy link
Author

Superskyyy commented Dec 20, 2024

After the workaround, the server still failes to start

Notice the log, next dev 3000 is missing a -p flag.

Starting development servers

Installing frontend dependencies using npm. It might take a while...
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm warn deprecated @aws-sdk/[email protected]: This package has moved to @smithy/signature-v4
npm warn deprecated @aws-sdk/[email protected]: This package has moved to @smithy/protocol-http
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported

added 1130 packages, and audited 1131 packages in 1m

299 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Waiting for frontend to start, port: 3000, process id: 65968

> [email protected] dev
> next dev 3000

Invalid project directory provided, no such directory: /home/ubuntu/Synthetic/2/.frontend/3000
Traceback (most recent call last):
  File "/home/ubuntu/Synthetic/2/run.py", line 75, in start_development_servers
    frontend_process, frontend_port = await _run_frontend()
                                      ^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/Synthetic/2/run.py", line 161, in _run_frontend
    raise RuntimeError("Could not start frontend dev server")
RuntimeError: Could not start frontend dev server

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ubuntu/Synthetic/2/run.py", line 55, in dev
    asyncio.run(start_development_servers())
  File "/home/ubuntu/.pyenv/versions/3.12.8/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.pyenv/versions/3.12.8/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.pyenv/versions/3.12.8/lib/python3.12/asyncio/base_events.py", line 686, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/ubuntu/Synthetic/2/run.py", line 105, in start_development_servers
    raise SystemError(f"Failed to start development servers: {str(e)}") from e
SystemError: Failed to start development servers: Could not start frontend dev server
Child process exited with code=1
Failed to run app: 1

Aborting installation.
Unexpected error. Please report it as a bug:
 1```

@Superskyyy
Copy link
Author

image
I'm not sure why everyone else seem to be ok with running it, but the -- is necccesary and after adding it, it start to work. AFAIK the -- is necssary in NPM to make arg passing work.

@Superskyyy
Copy link
Author

@leehuwuj https://www.npmjs.com/package/create-llama/v/0.2.17 using this version is fine, which dosn't go through the newer simplified logic. Can you help to take a look at these two issues?

@myhendry
Copy link

image I'm not sure why everyone else seem to be ok with running it, but the -- is necccesary and after adding it, it start to work. AFAIK the -- is necssary in NPM to make arg passing work.

for newbies like me, the code amended is inside the run.py file

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

Successfully merging a pull request may close this issue.

4 participants