Page MenuHomekolab.org

Assets give 404 error
Closed, ResolvedPublic

Description

So, I went through the steps in README (Do we really need node/npm? I feel overwhelmed) and executed the application. When I access it in the browser css and js files aren't loaded.

[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /css/app.css (KolabChat.Router)
    (kolab_chat) web/router.ex:1: KolabChat.Router.match_route/4                                                                 
    (kolab_chat) web/router.ex:1: KolabChat.Router.do_call/2                                                                     
    (kolab_chat) lib/kolab_chat/endpoint.ex:1: KolabChat.Endpoint.phoenix_pipeline/1                                             
    (kolab_chat) lib/plug/debugger.ex:123: KolabChat.Endpoint."call (overridable 3)"/2                                           
    (kolab_chat) lib/kolab_chat/endpoint.ex:1: KolabChat.Endpoint.call/2                                                         
    (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4                                        
    (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4                                                             

[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /js/app.js (KolabChat.Router)                                    
    (kolab_chat) web/router.ex:1: KolabChat.Router.match_route/4                                                                 
    (kolab_chat) web/router.ex:1: KolabChat.Router.do_call/2                                                                     
    (kolab_chat) lib/kolab_chat/endpoint.ex:1: KolabChat.Endpoint.phoenix_pipeline/1                                             
    (kolab_chat) lib/plug/debugger.ex:123: KolabChat.Endpoint."call (overridable 3)"/2                                           
    (kolab_chat) lib/kolab_chat/endpoint.ex:1: KolabChat.Endpoint.call/2                                                         
    (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4                                        
    (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4                                                             

[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /favicon.ico (KolabChat.Router)
    (kolab_chat) web/router.ex:1: KolabChat.Router.match_route/4                                                                 
    (kolab_chat) web/router.ex:1: KolabChat.Router.do_call/2                                                                     
    (kolab_chat) lib/kolab_chat/endpoint.ex:1: KolabChat.Endpoint.phoenix_pipeline/1                                             
    (kolab_chat) lib/plug/debugger.ex:123: KolabChat.Endpoint."call (overridable 3)"/2                                           
    (kolab_chat) lib/kolab_chat/endpoint.ex:1: KolabChat.Endpoint.call/2                                                         
    (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4                                        
    (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4

Details

Ticket Type
Task

Related Objects

Event Timeline

Do we really need node/npm?

In the default setup, it uses brunch for asset management to pull together the css, etc. Brunch is based on node. Pretty much ALL of the current front-end asset managers are. Webpack is the current "hotness", and one can use that with Phoenix instead of Brunch if desired, but it also uses node.

[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /css/app.css (KolabChat.Router)

This sounds like either the npm install step did not work properly, or was skipped? because this is what Brunch is responsible for making.

seigo moved this task from Backlog to In Progress on the Kolab Chat board.Nov 23 2016, 10:46 AM

Ouch. Indeed. As I had problems with installing npm on Kolab:Winterfell host (see T1967) I installed npm manually, but it looks like the version I installed does not support Node.js 0.12.8 which comes with Kolab.

Aha. Hopefully you can install node.js from another source, then? Node.js is only required for development, so we shouldn't need to bump requirements in Winterfell as that only needs to contain runtime requirements AFAIK

Removed Kolab's nodejs and installed Node.js v6. Now it works. There's only one error now:

[error] backend port not found: :inotifywait

That only means live reloading won't work, so not critical .. but also nicer to have.

Install the inotify-tools package and you should gain this capability on the next start of the app.

(.. and perhaps this should all be added to the README.md to help others?)

seigo closed this task as Resolved.Nov 25 2016, 10:12 AM
seigo claimed this task.

Ok, have added some more info to the README.

seigo moved this task from In Progress to Done on the Kolab Chat board.Nov 25 2016, 10:12 AM