Python manage.py tailwind install seems to run in wrong directory

I installed Django-tailwind according to the documentation but am now facing an issue when trying to python manage.py tailwind install.

The theme app was created successfully and contains a package.json file. npm is found since i specified the NPM_BIN_PATH. However, on running the install command i get an ENOENT error no such file or directory, open 'C:\Windows\package.json

The Package is on \[...]\project\theme\static_src\package.json

It seems that node is looking for the package outside of the project directory.

What do I have to change for the script to reference my project DIR? VS Code is executed as admin and the terminal is in the project directory.

I am on Windows 11 Home version 24H2, node v22.16.0 and npm 10.9.2

The error message:

npm error code ENOENT
npm error syscall open
npm error path C:\Windows\package.json
npm error errno -4058
npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'C:\Windows\package.json'
npm error enoent This is related to npm not being able to find a file.
Вернуться на верх