-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET 8, Web Assembly Deploy Gets "No such file or directory" error on Heroku #192
Comments
Hello @RobertMeakin Have you checked https://github.com/search?q=repo%3Ajincod%2Fdotnetcore-buildpack+blazor&type=issues and especially #75 (comment)? |
Hi,
This surprised me because this online tutorial makes no mention of this: My solution was to add a separate node app with express that would serve the static files in wwwroot. npm init -y
npm install express node_server/index.js : const express = require('express');
const path = require('path');
const app = express();
app.use(express.static(path.join(__dirname, '../wwwroot')));
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
}); Procfile: Then write a bash script that would take care of running dotnet publish -c Release -o release, copy the wwwroot folder to the express app and push to heroku. |
BlazorWebAssembly on net8.0.
I add the correct buildpack and run
git push heroku main
.The console shows it building as expected (with the correct .Net version) but in the Heroku, Application Logs, I get the following.
Any help is much appreciated.
The text was updated successfully, but these errors were encountered: