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

Cannot install CLI on windows #974

Open
MrPupik opened this issue Jul 3, 2024 · 1 comment
Open

Cannot install CLI on windows #974

MrPupik opened this issue Jul 3, 2024 · 1 comment
Labels
bug/0-needs-info More information is needed for reproduction. kind/bug A reported bug.

Comments

@MrPupik
Copy link

MrPupik commented Jul 3, 2024

Bug description

When starting a new project in windows, python -m prisma ... fails when trying to install prisma CLI (I suspect it fails using npm)

How to reproduce

Start a new empty project on windows 11 and attempt generating the client.
Error:

prismaPythonSample  .venv ❯ python -m prisma         
This command is only intended to be invoked internally. Please run the following instead:
prisma <command>
e.g.
prisma generate
prismaPythonSample  .venv ❯ python -m prisma generate
YYYYYYYYYYYYYY
['generate']
Installing Prisma CLI
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\__main__.py", line 6, in <module>
    cli.main()
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\cli\cli.py", line 39, in main
    sys.exit(prisma.run(args[1:]))
             ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\cli\prisma.py", line 35, in run
    entrypoint = ensure_cached().entrypoint
                 ^^^^^^^^^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\cli\prisma.py", line 88, in ensure_cached
    proc = npm.run(
           ^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\_proxy.py", line 19, in __getattr__
    return getattr(self.__get_proxied__(), attr)
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\_proxy.py", line 38, in __get_proxied__
    self.__proxied = proxied = self.__load__()
                               ^^^^^^^^^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\cli\_node.py", line 406, in __load__
    return resolve(self.target)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\cli\_node.py", line 281, in resolve
    return NodeBinaryStrategy.resolve(target)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\cli\_node.py", line 149, in resolve
    path = _get_global_binary(target)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\cli\_node.py", line 333, in _get_global_binary
    if not _should_use_binary(target=target, path=path):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\cli\_node.py", line 355, in _should_use_binary
    version = _get_binary_version(target, path)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itayn\dev\prismaPythonSample\.venv\Lib\site-packages\prisma\cli\_node.py", line 377, in _get_binary_version
    proc = subprocess.run(
           ^^^^^^^^^^^^^^^
  File "C:\Users\itayn\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\itayn\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\itayn\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child
@RobertCraigie
Copy link
Owner

@MrPupik can you share a full stack trace? It looks like your error is cut off.

@RobertCraigie RobertCraigie added bug/0-needs-info More information is needed for reproduction. kind/bug A reported bug. labels Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/0-needs-info More information is needed for reproduction. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

2 participants