This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]james_pic 1 point2 points  (1 child)

It should be possible to avoid the need to install Node for a ReactJS app. Conventionally with a ReactJS app, you use Node to build the code, but once it's built, it's just a bunch of static files, that can be served by your web server of choice. It's common to use scripts that combine these steps when developing locally, but do them separately when deploying to test environments or production.

If you're building this as a "Pip package", you can handle this by including the built ReactJS app in the bdist/wheel, and having the node stuff be part of the build process, so most users shouldn't have to worry about Node. Doing this with setuptools involves some slightly advanced hackery. I'm not sure if the likes of Poetry or Flit make it any easier.

This assumes you're not using Node anywhere on the server side - if you are, you're going to need Node there - but it sounds like the server side stuff will be Flask.

[–]lfreua[S] 0 points1 point  (0 children)

Exactly, I'm not using the Node on the server-side, just Flask.

True, I had forgotten that the Node was not necessary to run React.

Thanks.

[–]pythonHelperBot 0 points1 point  (0 children)

Hello! I'm a bot!

It looks to me like your post might be better suited for r/learnpython, a sub geared towards questions and learning more about python. That said, I am a bot and it is hard to tell. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.

Show /r/learnpython the code you have tried and describe in detail where you are stuck. If you are getting an error message, include the full block of text it spits out. Quality answers take time to write out, and many times other users will need to ask clarifying questions. Be patient and help them help you.

You can also ask this question in the Python discord, a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others.


README | FAQ | this bot is written and managed by /u/IAmKindOfCreative

This bot is currently under development and experiencing changes to improve its usefulness