Other ReactJS project no autorefresh on FreeBSD?

Any other FreeBSD users using ReactJS on FreeBSD? I just started going through some of the introductory tutorials, and noticed that when I start the ReactJS project with the dev server, it does not actually autorefresh after saving changes to the project. This works under Linux, so I am quite certain that its not me (or at least not anything I am stupidly doing). I would love to hear from someone else if this is anything they have experienced and might know of a fix or work around (other than manually restarting the nodejs server).
 
React is JavaScript. I don't know how that would have anything to do with FreeBSD.
Yes, that was kinda my question. This works on Mac, Windows, Linux, but not on FreeBSD. Seeing how I am trying to do this on FreeBSD, and not the others, I am petitioning for insight/help to the issue. Correct me if I am wrong, but it seems to me that questions pertaining to Python and Perl could equally be so easily dismissed as "not related to FreeBSD". Yet posting here, I had to categorize my post as "C/C++", "Python", "Perl", "Shell", "Other". This is clearly "Other" and the best I can tell still is a FreeBSD topic. FWIW, Javascript is in the FreeBSD ports. Go figure.
 
Javascript is in the FreeBSD ports. Go figure.
How so? Again, JavaScript runs in the browser and is part of that so it can't be installed separately.

That said, you would need to provide example code you are having problems with before anyone can help you. I ran a web dev company for 18 years using FreeBSD and never had any issues. But I would never use React so I doubt I can be of any help.
 
How so? Again, JavaScript runs in the browser and is part of that so it can't be installed separately.

That said, you would need to provide example code you are having problems with before anyone can help you. I ran a web dev company for 18 years using FreeBSD and never had any issues. But I would never use React so I doubt I can be of any help.
How so? From the pkg search:
Code:
node10-10.24.1_2               V8 JavaScript for client and server
node14-14.18.1_1               V8 JavaScript for client and server
node16-16.13.0                 V8 JavaScript for client and server
npm-node14-6.14.8_1            Node package manager
npm-node16-6.14.8_1            Node package manager
npm-node17-6.14.8_1            Node package manager

How to replicate
Code:
pkg install node16 npm-node16
npm install -g create-react-app
create-react-app hello-world
cd hello-world
npm start
Default web browser will pop up connecting to http://localhost:3000
Live server is running.
You should be able to edit src/App.js and upon saving, the server auto-refreshes
It doesn't. I know it's not the browser because if I completely close the browser, and then start it afresh and reconnect the content has not changed. It is a NodeJS server problem.

I thought this would be clear enough from my initial comments, at least to someone who has a rudimentary understanding of React. Perhaps, it would not have been.

I understand your confusion, Javascript has been historically only a client-side language (except when Netscape released Server-Side Javascript for their Flow Process Server in the late 90's). But it is a backend language as well, nowadays. Some goof at Google wrote a super efficient compiler for the language (V8) back in 2008, and the rest is, well, shall we say, "history". React projects come with a web server written in 100% Javascript. I think this is where my problem lies. So, my question is why does it behave differently on FreeBSD? Even if it can't be fixed, I want to understand what is happening.
 
ReactJS is client side.

But as I understood this thread, it's more about some dev environment that should have some "auto-refresh" as a convenience function. Maybe some more info about that would help.

I personally think most usage of React and similar SPA frameworks should warrant some tarring and feathering (all those cases where a "normal" web app would do just fine) -- but that's off-topic here 😈
 
How so? From the pkg search:
Well, you said Javascript was in ports and it's not. Those are libraries and package managers. Yes, they are written in javascript but the language itself is not.

But, again, I've run node and npm on FreeBSD servers over a decade (and you can't confuse me) for things like Stripe and Braintree credit card processing, along with custom software we wrote and never had any issues.

But until you provide code, no one is going to be able to help you.
 
If the software is using inotify(7) to monitor file changes this may explain why it's not refreshing under FreeBSD. See how your devserver is implementing watchFiles function.
Thanks! That was what I was wondering but wasn't sure where to look. I am finding some references in the dependencies, but nothing for watchFiles. I added the inotify-tools and inotify compatibility library for kevent to no avail. Sounds like I'll need to file a bug report with the React team or at least ask questions there.
 
I personally think most usage of React and similar SPA frameworks should warrant some tarring and feathering
[off topic]
An empy react project is about 50mb and contains thousands of files.

And everybody seems ok with that.



JavaScript was a mistake.
[/off topic]
 
Top