Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Application.css & application.js not generated hence not found #838

Closed
Ibrahimous opened this issue Jan 9, 2018 · 3 comments
Closed

Application.css & application.js not generated hence not found #838

Ibrahimous opened this issue Jan 9, 2018 · 3 comments

Comments

@Ibrahimous
Copy link

Hi,

I'm kind of going crazy trying to understand why on earth buffalo isn't generating the proper assets.
The code I'm working on worked last night. I've juste git cloned it on a different computer, modified database.yml and launched:
$ buffalo dev
in it.

The application launches, but I get on the landing page (a classic application.html containing an index.html):
GET http://localhost:3000/assets/application.css [HTTP/1.1 404 Not Found 0ms]
GET http://localhost:3000/assets/application.js [HTTP/1.1 404 Not Found 0ms]

And indeed, in the console, I get only:

$ buffalo dev
buffalo: 2018/01/09 10:26:56 === Rebuild on: :start: ===
buffalo: 2018/01/09 10:26:56 === Running: go build -v -i -o tmp/coke-build  (PID: 12339) ===
github.com/coke
buffalo: 2018/01/09 10:26:58 === Building Completed (PID: 12339) (Time: 2.307928013s) ===
buffalo: 2018/01/09 10:26:58 === Running: tmp/coke-build (PID: 12370) ===
Starting application at 127.0.0.1:3000
INFO[2018-01-09T10:26:58+01:00] Starting Simple Background Worker

No css stuff loading...

I have the following code in application.html:

<html>
...
    <div class="container">
      <%= partial("flash.html") %>
      <%= yield %>
    </div>

    <%= javascriptTag("application.js") %>
  </body>
    ...
</html>

& I have the following environment:
$ buffalo info

Buffalo Version

v0.10.2

App Information

Pwd=<user_home>/DEV/Go/src/github.com/coke
Root=<user_home>/DEV/Go/src/github.com/coke
GoPath=<user_home>/DEV/Go
Name=coke
Bin=bin/coke
PackagePkg=github.com/coke
ActionsPkg=github.com/coke/actions
ModelsPkg=github.com/coke/models
GriftsPkg=github.com/coke/grifts
WithPop=true
WithDep=false
WithWebpack=true
WithYarn=true
WithDocker=true
WithGrifts=true

Go Version

go version go1.9.2 linux/amd64

Go Env

GOARCH="amd64"
GOBIN="<user_home>/DEV/Go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="<user_home>/DEV/Go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build374332128=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

Node Version

v8.9.4

NPM Version

5.6.0

Yarn Version

1.3.2

Dep Version

dep Not Found

Dep Status

dep Not Found

PostgreSQL Version

PostgreSQL Not Found

MySQL Version

mysql Ver 15.1 Distrib 10.1.29-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

SQLite Version

3.21.0 2017-10-24 18:55:49 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de4alt1

@Ibrahimous
Copy link
Author

For information, I made the app work by creating a new app and copying the previously modified files in the new repo. May there have been a problem with git having not committed a file necessary to assets generation by webpack ?
Thx !

@markbates
Copy link
Member

You probably need to run yarn install to create and install your node_modules directory. Run that, restart, and you should be good.

@Ibrahimous
Copy link
Author

Yes !! Indeed, it works fine now, thank you very much !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants