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

Issue finding npm path #354

Open
grant-oscillolabs opened this issue Apr 18, 2024 · 3 comments
Open

Issue finding npm path #354

grant-oscillolabs opened this issue Apr 18, 2024 · 3 comments

Comments

@grant-oscillolabs
Copy link

I decided to give this a shot when integrating into an existing project and came across path referencing issues, specifically for npm based commands that are run via the subprocess.Popen commands (apologies if I've got the terminology wrong here). I've got the path to my npm set up correctly, can run the npm exec generate_client_configuration globally from the terminal and can see the path when printing out the PATH env variable before the command. Specifiying the full path to npm in those commands works and I wasn't sure where to next in terms of fault finding.

A potential solution I've seen is in the django-tailwind app, where the path to npm can be set within the settings file to overcome this issue. A quick look through the source shows reactivated\app.py and reactivated\__init__.py containing references to npm, I'd be happy to create a PR but I'm still quite new to the git side of house so bear with me on that front haha

@silviogutierrez
Copy link
Owner

Could you upload a reproduction of some sort? Or print what the path should be vs what the path currently is within Django?

@grant-oscillolabs
Copy link
Author

I'll look at a minimum working exmaple repo and upload, but in the interim, this is what I set (current OS is Windows 11)
NPM_BIN_PATH = r"C:\Program Files\nodejs\npm.cmd"

@silviogutierrez
Copy link
Owner

Ok, repro will help, but note that Windows is not officially supported. Let's see if the repro causes an issue on Linux/macOS as well.

https://www.reactivated.io/documentation/getting-started/#requirements

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

No branches or pull requests

2 participants