lutzroeder / netron

Visualizer for neural network, deep learning and machine learning models
https://netron.app
MIT License
26.95k stars 2.71k forks source link

Hosting A Web Version #1236

Closed BlackBoyZeus closed 4 months ago

BlackBoyZeus commented 4 months ago

How may one host a web app of their own ? It seems that i keep retaining errors such as protobuffer.js failed to load, and i get this for any number of the files held in the source folder when i attempt to take this to aws amplify

screenshot is attached below. Simply put we would like to see how to make this run seamlessly , but i can't identify where in the code the problem arises. Thanks for all you've done.

Screenshot 2024-02-26 at 7 04 14 PM
BlackBoyZeus commented 4 months ago

in fact --- it seems 2024-02-27T02:49:30.850Z [INFO]: # Cloning repository: git@github.com:Ultrabrain/UltraNetworkPricing.git 2024-02-27T02:49:41.644Z [INFO]: 2024-02-27T02:49:41.741Z [INFO]: Cloning into 'UltraNetworkPricing'... 2024-02-27T02:49:41.741Z [INFO]: # Checking for Git submodules at: /codebuild/output/src1996811145/src/UltraNetworkPricing/.gitmodules 2024-02-27T02:49:41.756Z [INFO]: # Retrieving environment cache... 2024-02-27T02:49:41.804Z [WARNING]: ! Unable to write cache: {"code":"ERR_BAD_REQUEST","message":"Request failed with status code 404"})} 2024-02-27T02:49:41.805Z [INFO]: ---- Setting Up SSM Secrets ---- 2024-02-27T02:49:41.805Z [INFO]: SSM params {"Path":"/amplify/d2cpdmfrzlrxw0/main/","WithDecryption":true} 2024-02-27T02:49:41.848Z [WARNING]: !Failed to set up process.env.secrets 2024-02-27T02:49:43.129Z [INFO]: No live updates for this build run 2024-02-27T02:49:43.133Z [INFO]: # Retrieving cache... 2024-02-27T02:49:43.159Z [INFO]: # Retrieved cache 2024-02-27T02:50:02.907Z [INFO]: ## Starting Backend Build

Checking for associated backend environment...

2024-02-27T02:50:02.913Z [INFO]: ## No backend environment association found, continuing...

Completed Backend Build

                             {"backendDuration": 0}
                             ## Starting Frontend Build
                             # Starting phase: preBuild
                             # Executing command: npm install

2024-02-27T02:50:25.290Z [INFO]: # Completed phase: preBuild

Starting phase: build

                             # Executing command: npm run build

2024-02-27T02:50:25.596Z [INFO]: build 2024-02-27T02:50:25.598Z [INFO]: build web 2024-02-27T02:50:25.598Z [INFO]: mkdir dist/web 2024-02-27T02:50:25.599Z [INFO]: cp source/dir dist/dir 2024-02-27T02:50:25.607Z [INFO]: rm dist/web/app.js 2024-02-27T02:50:25.633Z [INFO]: build electron 2024-02-27T02:50:26.839Z [INFO]: • 2024-02-27T02:50:26.840Z [INFO]: electron-builder version=24.12.0 2024-02-27T02:50:26.841Z [INFO]: • 2024-02-27T02:50:26.843Z [INFO]: loaded configuration file=package.json ("build" field) 2024-02-27T02:50:27.742Z [INFO]: • 2024-02-27T02:50:27.743Z [INFO]: electron-builder version=24.12.0 os=4.14.291-218.527.amzn2.x86_64 2024-02-27T02:50:27.748Z [INFO]: • 2024-02-27T02:50:27.748Z [INFO]: loaded configuration file=package.json ("build" field) 2024-02-27T02:50:28.017Z [INFO]: ⨯ 2024-02-27T02:50:28.017Z [INFO]: Cannot find module 'dmg-license' Require stack:

lutzroeder commented 4 months ago

@BlackBoyZeus the error is likely from one of the import * as text from './text.js'; statements in the code, probably because the file was not deployed to the right location on the server. In the log it is not clear why you are running build electron for a web deployment. Can you explain what you are trying to accomplish and why this requires a custom server deployment instead of using the Python server?

BlackBoyZeus commented 4 months ago

I have resolved the issue, it was more so for testing purposes with AWS compatible hosting on such code. I was not expecting such speed in response haha , but i had to direct the entry point to source folder for future reference in case you encounter such complaint furthermore.