Closed bkuhlmann closed 1 year ago
@bkuhlmann I don't think this is a problem with Overmind. I can use both foreman and overmind to launch from my Procfile.dev and they both work.
I think you hit a known issue that we plan to release a fix for in an rc2 release ASAP.
If you inspect your newly demo/
app, you might notice there is no package-lock.json
. This is why node isn't loading hanami-assets properly: it's not installed, because we generated an incorrectly formatted version for the hanami-assets package in package.json
.
If you go into package.json
and change the version for hanami-assets to "^2.1.0-rc.1"
and then run nom install
, you should be good to go again. Let me know.
If you're looking to test, there's one more thing you'll need to fix too. Just go replace the contents of your app/templates/layouts/app.html.erb
with the following (this fixes some helper names):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bookshelf</title>
<%= favicon_tag %>
<%= stylesheet_tag "app" %>
</head>
<body>
<% if flash[:alert] %>
<p><%= flash[:alert] %></p>
<% end %>
<% if flash[:notice] %>
<p><%= flash[:notice] %></p>
<% end %>
<%= yield %>
<%= javascript_tag "app" %>
</body>
</html>
Let me know how you go! And thanks for testing this out :)
Thanks. Yes, I see the problem now. I had to use the following to properly confirm since I had installed JavaScript dependencies earlier:
rm -f package-lock.json
npm install
Using latest
-- which is what I was originally using -- also works (didn't realize the package-lock.json
wasn't being updated):
"dependencies": {
"hanami-assets": "latest"
}
Closing this since I can make this work locally, now.
Why
Since the introduction of assets in 2.1.0 Beta 2, it hasn't been possible to launch the app using Overmind due to the following error:
The above is true when using Foreman as well so this isn't specific to Overmind.
How
To recreate, run:
On the other hand, using
hanami server
works since assets are not being used.Notes
Here's my environment: