roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.72k stars 3.06k forks source link

Missing file manifest.json #1084

Closed dspstudio closed 10 years ago

dspstudio commented 10 years ago

i just installed the theme and i receive: Warning: file_get_contents(/var/www/xhtmlwebdesign.com/wp-content/themes/roots-master/assets/manifest.json): failed to open stream: No such file or directory in /var/www/xhtmlwebdesign.com/wp-content/themes/roots-master/lib/scripts.php on line 23

the file doesn't exist.

retlehs commented 10 years ago

you need to run grunt build to produce the files necessary for non-development environments

hans2103 commented 10 years ago

what if there is no grunt installed on the shared hosting?

QWp6t commented 10 years ago

grunt is intended to be installed locally and used during development, chief.

hans2103 commented 10 years ago

@QWp6t : thanks your for the clearification. Not everyone Wordpress user has a local server. I have... so I can continue to develop. Just wondering how to develop on a shared hosting.

QWp6t commented 10 years ago

grunt doesn't require a local web server. it just requires node/npm.

feel free to check out the readme. that's why it's there. https://github.com/roots/roots#theme-development

lucasdegen commented 9 years ago

What about installing it on a USB using XAMPP?

jarc100 commented 9 years ago

after running

grunt build

This issue persist.

This is my full log from npm install:

npm ERR! roots@7.0.1 postinstall: node node_modules/bower/bin/bower install && grunt dev npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the roots@7.0.1 postinstall script. npm ERR! This is most likely a problem with the roots package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node node_modules/bower/bin/bower install && grunt dev npm ERR! You can get their info via: npm ERR! npm owner ls roots npm ERR! There is likely additional logging output above. npm ERR! System Darwin 13.1.0 npm ERR! command "node" "/usr/local/bin/npm" "install" npm ERR! cwd /Applications/XAMPP/xamppfiles/htdocs/disenn/wp-content/themes/disennio npm ERR! node -v v0.10.24 npm ERR! npm -v 1.3.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Applications/XAMPP/xamppfiles/htdocs/disenn/wp-content/themes/disennio/npm-debug.log npm ERR! not ok code 0

JulienMelissas commented 9 years ago

@jarc100 this issue has been covered many times before.

  1. Make sure you have bower installed
  2. Run bower install
  3. Then run grunt build or grunt dev
jarc100 commented 9 years ago

@JulienMelissas i'm sorry if this has been covered before, but i kept getting this error every time i try it. I do have bower installed, i had also update grunt and npm and the issue persist.

This is what i do:

Create a new folder into my wp-content/themes folder, then clone roots into it. run npm install then i get the error.

As i mentioned before, bower it is install so i do not know what could be causing this error. Sorry again and thanks in advance for any possible solution you may have.

austinpray commented 9 years ago

@jarc100 Inside of package.json: https://github.com/roots/roots/blob/master/package.json#L20 Delete the line that says "postinstall".

Install bower globally

npm install -g bower

Install grunt globally

npm install -g grunt-cli

then run:

npm install
bower install
grunt build
QWp6t commented 9 years ago

@austinpray, actually it's grunt-cli, not grunt.

npm install -g bower grunt-cli
austinpray commented 9 years ago

@QWp6t Thanks dawg

jarc100 commented 9 years ago

Ok, i have successfully run grunt build i was trying to use roots-sass as i am more comfortable using sass than less. Doing the same thing using both roots-master and roots-sass-master have different results. I am not sure the reason but roots-sass-master was producing the errors.

adammichaelwood commented 9 years ago

I feel like I'm missing something, but I don't have any idea what the problem is....

I have installed all the things. I get an apparently successful build message from grunt. But when I then deploy (to Pantheon) via git push, i get that error message.

I have tried it with and without deleting that line#20 from that file (I have no idea why I should/would do this either way). Same problem, over and over.

any ideas?

adammichaelwood commented 9 years ago

in the off-chance anyone else is having this same problem...

the gitignore file ignores all the stuff that gets built when you build with grunt (which kinda makes sense, I guess)

So if you are using building locally and then using git to deploy, you have to update the .gitignore file and remove all the stuff related to compiled css.

austinpray commented 9 years ago

which kinda makes sense, I guess

No, this makes complete sense. Do not check compiled files into source control. It makes everything difficult.

So if you are using building locally and then using git to deploy, you have to update the .gitignore file and remove all the stuff related to compiled css.

No this is not right. The gitignore is fine. If you are deploying with git the process should look like this:

  1. Pull the latest code from the git repo.
  2. Run the compile step.

It looks like pantheon does not have any hooks for running build steps after pushing. So in your specific instance it looks like you are stuck with checking files into git, but to anyone reading: this is not a good solution. The solution would be use a continuous integration solution, host that has post deploy hooks, or a deploy process with deploy hooks.

adammichaelwood commented 9 years ago

Thanks.

  1. Do you know if there IS a "right" way to do this with Pantheon?
  2. Do you have a better suggestion for a hosting platform?

(3. Other than "that's wrong" --- which is totally valid! --- is there a serious problem I might encounter with having compiled files checked into git?)