flutter web app showing blank screen after releasing on Node JS server - node.js

I have made a Flutter Web app and it is running perfectly on Debug and Release mode. But when I deploy it to my NodeJS webserver which serves the Webpage index.html from the contents which were built by running command flutter build web, I get a blank screen (White) whenever I try to access the webpage using google chrome by typing out the URL. I have inspected the webpage too but found no errors on it.
Can anyone find any reasons for this and how to solve it?

Related

node.js express won't open in browser

I can open a browser page with HTML/CSS & it works, but when I type in the code for node.js then click on Go Live, the files show up but no message or any network traffic. I updated everything. I even copied & pasted the code from Node.js for the express server but it won't load to the browser. this is all that shows up.
Your help will be greatly appreciated!
Go live (with VSCode Live Server Extension) and running your server with Node.js are two different things.
Check Node.js getting started documentation (Link)

How do I setup and deploy a local execution app for Google smart home action?

I am implementing the local execution functionality for my google smart home action. I am following the steps in this link:
https://developers.google.com/actions/smarthome/develop/local
I have already configured the scanning data in the console, and now I am trying to deploy my local execution app. I know how to program in javascript, I have created a couple of firebase functions, but I am not an expert in node.js. I don't understand how to setup and run this javascript app.
I tried to run it on the browser, but it says it cannot find "require", and I read that node.js is not supposed to run on client side. In the link above, it says to create an index.html, that declares the "local_execution.js". Is this javascript module going to run on client side? Can someone point me in the right direction? Maybe explain how to setup the app directory.
Thank you in advance,
Henrique
The best place to get started would be with the local home sample app on GitHub. This sample includes both a local execution app and a compatible virtual device, with instructions to get it compiled and deployed.
For testing, you need to host the web app (HTML/JavaScript) in a location that's accessible to your Home device. This could be a local dev server or something like Firebase Hosting (the sample has instructions for both). The hosted URL goes in the console under Test > On device testing.
I tried to run it on the browser, but it says it cannot find "require", and I read that node.js is not supposed to run on client side.
The Home devices run a browser-based (Chrome) environment, so your JavaScript must be compatible with the browser. If you use Node programming paradigms (e.g. importing modules using require) in your code, you need to use a bundler tool such as Webpack or Parcel to package the code for the browser. The sample uses Webpack to accomplish this.
Side Note: You can't run even a properly packaged local home app in the browser on your development machine because the local home SDK only exists on Home devices.

ReastJS, Node, and IIS

I have been following a tutorial from Cory House on Pluralsight about React, Redux, webpack, babel, and a bunch of other support libraries. I am using Visual Studio Code on a windows OS. I have completed the tutorial, which includes a build process that outputs a bundled js file to a dist folder. The build process also runs the app to verify the build is correct (which it is). I then tried to copy the contents up to an IIS server and run it there. However, when I try to access the web site, the index page comes up blank. I verified the bundled js file is called (returns 200 status). That left me wondering if there is an extra step I need to do to transfer an app created using Node to one that can run on IIS.
I should clarify I added a web.config file to the site.
Any help is appreciated
Edit: Here are two errors I am getting on when rendering the page. One of the errors (#2) appears to be a web pack module:
Error 1
Error 2
In error 2, "Attributes" is undefined
I figured it out partially. It had to do with react-router and my routing. When developing and running it locally, it was running at the root of local host:
http://localhost
When I moved it to the IIS server, I had to create an app under the default web site, which changed the apps url to:
http://localhost/ReactJS
That caused my routing to fail and loaded a blank page. However, even though the home page loads now since fixing the routing, it is still not working as I can't navigate to the other views, but at least I have narrowed it down.

node-inspector not working from generator-angular-fullstack app

I'm pretty new to grunt, and created a new app using generator-angular-fullstack and yeoman. I'm trying to figure out how to debug.
When I run grunt serve:debug, I get a Chrome window with http://localhost:8080/debug?port=5858
I then open my application at http://localhost:9000 in another Chrome tab.
Two issues though:
If I set a break point, the debugger never hits it
I can only set breakpoints in client side js, not server side
Thanks for any help

Running unity with NodeJS

I'm using NodeJS with Express and trying to run a Unity html file on my site.
Basically what I'm trying to do is to get a Unity html file I have to play on my NodeJS site. The files are WebPlayer.html and WebPlayer.unity3d. If I open up the local copy of WebPlayer.html in my browser, the game plays fine. However, if I try to run the game through my site, I get the message Failed to download data file. I've looked this up, and have seen people having the same issues as me, but couldn't find too many helpful suggestions from people using node. Any help would be appreciated. Thanks!
Running the local copy in my browser (unity is loading the game and is working fine). file:///Users/thomasbaldwin/Desktop/WebPlayer.html
Running the WebPlayer.html file on my local server.
http://localhost:3000/account/game/

Resources