That error indicates that your application js file failed to load. I beleive that you might still be using localhost path in your swift code, which will work fine in simulator, as both simulator and the localhost is running on the same machine. However, when you deploy the app to the Apple TV device, it will never be able to find localhost.
You simply need to host your entire client app somewhere in the cloud and then give the path of the hosted files. An other alternative would be to connect both your Apple TV and your machine to the same network and host your client app publicly in the local network. You can then provide your machine IP address as the path. On mac you have pre-installed apache so you can do something like below to host it within your local network.
// start your apache server from the terminal
sudo apachectl start
// then check whether you are able to access your webserver
// go to browser and type your ip address (you can check your ip in the network settings in System Preferences)
// by default you should see a page with content "It Works!"
Your files are by default available at this location, /Library/WebServer/Documents and you can put all your client code in this place. Then test the paths in your browser by hitting your IP address and the relative paths. If all works well, specify the same path in your Apple TV native code and deploy it to the actual device and test (make sure that both your device and your machine are connected to the same network).