jonathan-s / django-sockpuppet

Build reactive applications with the django tooling you already know and love.
https://github.com/jonathan-s/django-sockpuppet
MIT License
450 stars 22 forks source link

Can't run `python manage.py initial_sockpuppet` on Windows #106

Closed brno32 closed 3 years ago

brno32 commented 3 years ago

Bug Report

Describe the bug

Running python manage.py initial_sockpuppet gives me

(venv) PS C:\Users\brno3\Repos\playground\sock_demo> python manage.py initial_sockpuppet
Wrote to C:\Users\brno3\Repos\playground\sock_demo\package.json:

{
  "name": "sock_demo",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

C:\Users\brno3\AppData\Roaming\npm\add-project-script -> C:\Users\brno3\AppData\Roaming\npm\node_modules\add-project-script\dist\index.js
+ add-project-script@1.0.2
added 11 packages from 6 contributors in 1.45s
removed 11 packages in 0.158s
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "C:\Users\brno3\Repos\playground\sock_demo\venv\lib\site-packages\django\core\management\__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "C:\Users\brno3\Repos\playground\sock_demo\venv\lib\site-packages\django\core\management\__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\brno3\Repos\playground\sock_demo\venv\lib\site-packages\django\core\management\base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\brno3\Repos\playground\sock_demo\venv\lib\site-packages\django\core\management\base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "C:\Users\brno3\Repos\playground\sock_demo\venv\lib\site-packages\sockpuppet\management\commands\initial_sockpuppet.py", line 29, in handle
    subprocess.check_call(npm_pkg.split(' '))
  File "C:\Users\brno3\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 359, in check_call
    retcode = call(*popenargs, **kwargs)
  File "C:\Users\brno3\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 340, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Users\brno3\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\brno3\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

To Reproduce

Run python manage.py initial_sockpuppet in a fresh project on Windows

Expected behavior

No error!

Screenshots or reproduction

Versions

Django-sockpuppet

External tools

jonathan-s commented 3 years ago

Hey @brno32, I don't use windows so fixing this on windows becomes quite a hassle for me. If you're able to take a look at the underlying issue of this it would be much appreciated (or any other person using windows, who is reading this).