Skip to content
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

yeoman build:default fails in various ways (missing plugins.js/broken rjs config) #345

Closed
espy opened this issue Sep 10, 2012 · 7 comments
Closed

Comments

@espy
Copy link

espy commented Sep 10, 2012

Hey there, great project, scaffolding and the server work fine, but I just can't seem to build anything, or maybe I've misunderstood something :/

First case (run init with y,y,n,n,n)

I get an error during $ yeoman build:default on a clean project:

Writing to manifest.appcache...
Error: /scripts/plugins.js Not Found
    at Object.exports.error (/usr/local/lib/node_modules/yeoman/node_modules/connect/lib/utils.js:43:13)
    at Object.errorHandler [as handle] (/usr/local/lib/node_modules/yeoman/tasks/server.js:360:31)
    at next (/usr/local/lib/node_modules/yeoman/node_modules/connect/lib/proto.js:190:15)
    at exports.send (/usr/local/lib/node_modules/yeoman/node_modules/connect/lib/middleware/static.js:157:11)
    at Object.oncomplete (fs.js:297:15)
CACHE MANIFEST

Steps to replicate in empty dir:
$ yeoman init
// answer y,y,n,n,n
$ yeoman build:default
Build finishes with "no errors", but the above error is present in the output.

Running $ yeoman server:dist
Results in the browser displaying an unstyled version of the yeoman scaffolding site with a 404 for http://localhost:3501/scripts/plugins.js

Out of curiosity, I moved to a new directory and tried answering yeoman init with y,y,y,y,n (install everything), which led me to:

Second case (run init with y,y,y,y,n)

Init with all includes also leads to a failure in $ yeoman build:default:

Running "rjs" task

Options:
{ optimize: 'none',
  baseUrl: './scripts',
  wrap: true,
  name: 'main',
  mainConfigFile: 'scripts/main.js' }
Error: Missing either an "out" or "dir" config value. If using "appDir" for a full project optimization, use "dir". If you want to optimize to one file, use "out".
    at Function.build.createConfig (/usr/local/lib/node_modules/yeoman/node_modules/requirejs/bin/r.js:14852:19)

Thanks in advance!

@addyosmani
Copy link
Member

what happens when you just use yeoman build? Normally, we dont specify build profiles/targets to be used when building projects with yeoman, however default shouldnt really be having issues.

@espy
Copy link
Author

espy commented Sep 11, 2012

Ah, so I did misunderstand something :/ I ended up at yeoman build:default because yeoman build threw a JS error (same one as here: #338), but strangely, it doesn't do that anymore. Sorry about having to read all that up there. But:

yeoman build now works, and launching yeoman server:distalso works, but there's some css wonkiness, because the final compiled css file is always empty:

dist/styles/d41d8cd9.main.css exists, but it's empty.
dist/styles/main.scss has the bootstrap import (and, if I add stuff to app/styles/main.scss, it also has that).
app/styles/main.scss is therefore also fine.
app/styles/main.css is also correct.

yeoman server shows the correctly styled page, no errors are thrown anywhere and I've just reproduced this in three separate new directories. But the built version always has an empty .css file.

@addyosmani
Copy link
Member

Could you possibly paste us back a tree of your directory structure? If you don't have the tree command available `find . -print | sed -e 's;[^/]*/;|;g;s;|; |;g'z also works.

@espy
Copy link
Author

espy commented Sep 11, 2012

Here you go:

.
|_.editorconfig
|_.gitattributes
|_.gitignore
|_.jshintrc
|_.sass-cache
| |_14cd1d56c8d52bb9f8cb1d2c56c5d241f50c75d0
| | |__clearfix.scssc
| | |__float.scssc
| | |__hacks.scssc
| | |__min.scssc
| | |__reset.scssc
| | |__tag-cloud.scssc
| |_59296ef54594e943fc0af457f8518f4400aa9503
| | |__base.scssc
| | |__sprite-img.scssc
| |_5b0c424979a4bdd7aa1170adcd6e3e197c604a92
| | |__css3.scssc
| | |__support.scssc
| | |__typography.scssc
| | |__utilities.scssc
| |_620560645ef1b19eb6273959fdb2502d17ac8f5d
| | |__compass_twitter_bootstrap.scssc
| | |_main.scssc
| |_6a3e6eb489dd045e485b7bc8196517b6f9003ee8
| | |__grid-background.scssc
| |_70242597f2d0bbb8d90e2d47b6ff74fc2969c28c
| | |__color.scssc
| | |__general.scssc
| | |__sprites.scssc
| | |__tables.scssc
| |_7b6cd3bd730846802855540157c27cafe6f5aaae
| | |__ellipsis.scssc
| | |__force-wrap.scssc
| | |__nowrap.scssc
| | |__replacement.scssc
| |_807dfe353f212a8ed3b0dcfd7a57fdf9d3f1a11c
| | |__hover-link.scssc
| | |__link-colors.scssc
| | |__unstyled-link.scssc
| |_8a4fe68ab00692b88fcefbd979f10bbc54710aea
| | |__compass.scssc
| |_8b3f5247bd27bcae75553aec98dc97dfbe78a61c
| | |__alternating-rows-and-columns.scssc
| | |__borders.scssc
| | |__scaffolding.scssc
| |_9f62923a069ca60e8e2b1c48b5079453149df152
| | |__accordion.scssc
| | |__alerts.scssc
| | |__breadcrumbs.scssc
| | |__button-groups.scssc
| | |__buttons.scssc
| | |__carousel.scssc
| | |__close.scssc
| | |__code.scssc
| | |__component-animations.scssc
| | |__dropdowns.scssc
| | |__forms.scssc
| | |__grid.scssc
| | |__hero-unit.scssc
| | |__labels-badges.scssc
| | |__layouts.scssc
| | |__mixins.scssc
| | |__modals.scssc
| | |__navbar.scssc
| | |__navs.scssc
| | |__pager.scssc
| | |__pagination.scssc
| | |__popovers.scssc
| | |__progress-bars.scssc
| | |__reset.scssc
| | |__scaffolding.scssc
| | |__sprites.scssc
| | |__tables.scssc
| | |__thumbnails.scssc
| | |__tooltip.scssc
| | |__type.scssc
| | |__utilities.scssc
| | |__variables.scssc
| | |__wells.scssc
| |_a0a7c3dbf689bc175716d447d8ab044fd893220d
| | |__links.scssc
| | |__lists.scssc
| | |__text.scssc
| | |__vertical_rhythm.scssc
| |_a4426da89bf30b9301a08b281a9bf66dc91de51e
| | |__appearance.scssc
| | |__background-clip.scssc
| | |__background-origin.scssc
| | |__background-size.scssc
| | |__border-radius.scssc
| | |__box-shadow.scssc
| | |__box-sizing.scssc
| | |__box.scssc
| | |__columns.scssc
| | |__filter.scssc
| | |__font-face.scssc
| | |__hyphenation.scssc
| | |__images.scssc
| | |__inline-block.scssc
| | |__opacity.scssc
| | |__regions.scssc
| | |__shared.scssc
| | |__text-shadow.scssc
| | |__transform.scssc
| | |__transition.scssc
| |_cc82ef7d4b804818c0637eff6b99b927333f524a
| | |__contrast.scssc
| |_d9224f82511254194de39671327c4dbcb3f957e0
| | |__bullets.scssc
| | |__horizontal-list.scssc
| | |__inline-block-list.scssc
| | |__inline-list.scssc
| |_f962697fd1995cb59ff0e850bd77aa17174f4835
| | |__utilities.scssc
|_app
| |_.htaccess
| |_404.html
| |_favicon.ico
| |_images
| |_index.html
| |_robots.txt
| |_scripts
| | |_vendor
| | | |_bootstrap
| | | | |_bootstrap-affix.js
| | | | |_bootstrap-alert.js
| | | | |_bootstrap-button.js
| | | | |_bootstrap-carousel.js
| | | | |_bootstrap-collapse.js
| | | | |_bootstrap-dropdown.js
| | | | |_bootstrap-modal.js
| | | | |_bootstrap-popover.js
| | | | |_bootstrap-scrollspy.js
| | | | |_bootstrap-tab.js
| | | | |_bootstrap-tooltip.js
| | | | |_bootstrap-transition.js
| | | | |_bootstrap-typeahead.js
| | | |_jquery.min.js
| | | |_modernizr.min.js
| |_styles
| | |__compass_twitter_bootstrap.scss
| | |__compass_twitter_bootstrap_awesome.scss
| | |__compass_twitter_bootstrap_responsive.scss
| | |_compass_twitter_bootstrap
| | | |__accordion.scss
| | | |__alerts.scss
| | | |__breadcrumbs.scss
| | | |__button-groups.scss
| | | |__buttons.scss
| | | |__carousel.scss
| | | |__close.scss
| | | |__code.scss
| | | |__component-animations.scss
| | | |__dropdowns.scss
| | | |__font-awesome.scss
| | | |__forms.scss
| | | |__grid.scss
| | | |__hero-unit.scss
| | | |__labels-badges.scss
| | | |__layouts.scss
| | | |__mixins.scss
| | | |__modals.scss
| | | |__navbar.scss
| | | |__navs.scss
| | | |__pager.scss
| | | |__pagination.scss
| | | |__popovers.scss
| | | |__progress-bars.scss
| | | |__reset.scss
| | | |__responsive-1200px-min.scss
| | | |__responsive-767px-max.scss
| | | |__responsive-768px-979px.scss
| | | |__responsive-navbar.scss
| | | |__responsive-utilities.scss
| | | |__responsive.scss
| | | |__scaffolding.scss
| | | |__sprites.scss
| | | |__tables.scss
| | | |__thumbnails.scss
| | | |__tooltip.scss
| | | |__type.scss
| | | |__utilities.scss
| | | |__variables.scss
| | | |__wells.scss
| | |_main.css
| | |_main.scss
| |_templates
|_dist
| |_.htaccess
| |_404.html
| |_dist
| |_favicon.ico
| |_images
| |_index.html
| |_manifest.appcache
| |_robots.txt
| |_scripts
| | |_d7844ff9.plugins.js
| | |_vendor
| | | |_8bc61845.jquery.min.js
| | | |_bootstrap
| | | | |_0dfe7678.bootstrap-transition.js
| | | | |_39af607e.bootstrap-affix.js
| | | | |_437cd036.bootstrap-scrollspy.js
| | | | |_4a691926.bootstrap-carousel.js
| | | | |_6e43b0d0.bootstrap-dropdown.js
| | | | |_810e2170.bootstrap-collapse.js
| | | | |_81453238.bootstrap-button.js
| | | | |_a1d23a70.bootstrap-modal.js
| | | | |_c6285e1a.bootstrap-tooltip.js
| | | | |_d23b5f74.bootstrap-typeahead.js
| | | | |_dab95585.bootstrap-tab.js
| | | | |_e9a9c103.bootstrap-popover.js
| | | | |_f64cf7f2.bootstrap-alert.js
| | | |_cf69c6f2.modernizr.min.js
| |_styles
| | |__compass_twitter_bootstrap.scss
| | |__compass_twitter_bootstrap_awesome.scss
| | |__compass_twitter_bootstrap_responsive.scss
| | |_compass_twitter_bootstrap
| | | |__accordion.scss
| | | |__alerts.scss
| | | |__breadcrumbs.scss
| | | |__button-groups.scss
| | | |__buttons.scss
| | | |__carousel.scss
| | | |__close.scss
| | | |__code.scss
| | | |__component-animations.scss
| | | |__dropdowns.scss
| | | |__font-awesome.scss
| | | |__forms.scss
| | | |__grid.scss
| | | |__hero-unit.scss
| | | |__labels-badges.scss
| | | |__layouts.scss
| | | |__mixins.scss
| | | |__modals.scss
| | | |__navbar.scss
| | | |__navs.scss
| | | |__pager.scss
| | | |__pagination.scss
| | | |__popovers.scss
| | | |__progress-bars.scss
| | | |__reset.scss
| | | |__responsive-1200px-min.scss
| | | |__responsive-767px-max.scss
| | | |__responsive-768px-979px.scss
| | | |__responsive-navbar.scss
| | | |__responsive-utilities.scss
| | | |__responsive.scss
| | | |__scaffolding.scss
| | | |__sprites.scss
| | | |__tables.scss
| | | |__thumbnails.scss
| | | |__tooltip.scss
| | | |__type.scss
| | | |__utilities.scss
| | | |__variables.scss
| | | |__wells.scss
| | |_d41d8cd9.main.css
| | |_main.scss
| |_templates
|_Gruntfile.js
|_package.json
|_temp
| |_.htaccess
| |_404.html
| |_dist
| |_favicon.ico
| |_images
| |_index.html
| |_manifest.appcache
| |_robots.txt
| |_scripts
| | |_d7844ff9.plugins.js
| | |_vendor
| | | |_8bc61845.jquery.min.js
| | | |_bootstrap
| | | | |_0dfe7678.bootstrap-transition.js
| | | | |_39af607e.bootstrap-affix.js
| | | | |_437cd036.bootstrap-scrollspy.js
| | | | |_4a691926.bootstrap-carousel.js
| | | | |_6e43b0d0.bootstrap-dropdown.js
| | | | |_810e2170.bootstrap-collapse.js
| | | | |_81453238.bootstrap-button.js
| | | | |_a1d23a70.bootstrap-modal.js
| | | | |_c6285e1a.bootstrap-tooltip.js
| | | | |_d23b5f74.bootstrap-typeahead.js
| | | | |_dab95585.bootstrap-tab.js
| | | | |_e9a9c103.bootstrap-popover.js
| | | | |_f64cf7f2.bootstrap-alert.js
| | | |_cf69c6f2.modernizr.min.js
| |_styles
| | |__compass_twitter_bootstrap.scss
| | |__compass_twitter_bootstrap_awesome.scss
| | |__compass_twitter_bootstrap_responsive.scss
| | |_compass_twitter_bootstrap
| | | |__accordion.scss
| | | |__alerts.scss
| | | |__breadcrumbs.scss
| | | |__button-groups.scss
| | | |__buttons.scss
| | | |__carousel.scss
| | | |__close.scss
| | | |__code.scss
| | | |__component-animations.scss
| | | |__dropdowns.scss
| | | |__font-awesome.scss
| | | |__forms.scss
| | | |__grid.scss
| | | |__hero-unit.scss
| | | |__labels-badges.scss
| | | |__layouts.scss
| | | |__mixins.scss
| | | |__modals.scss
| | | |__navbar.scss
| | | |__navs.scss
| | | |__pager.scss
| | | |__pagination.scss
| | | |__popovers.scss
| | | |__progress-bars.scss
| | | |__reset.scss
| | | |__responsive-1200px-min.scss
| | | |__responsive-767px-max.scss
| | | |__responsive-768px-979px.scss
| | | |__responsive-navbar.scss
| | | |__responsive-utilities.scss
| | | |__responsive.scss
| | | |__scaffolding.scss
| | | |__sprites.scss
| | | |__tables.scss
| | | |__thumbnails.scss
| | | |__tooltip.scss
| | | |__type.scss
| | | |__utilities.scss
| | | |__variables.scss
| | | |__wells.scss
| | |_d41d8cd9.main.css
| | |_main.scss
| |_templates
|_test
| |_index.html
| |_lib
| | |_chai.js
| | |_expect.js
| | |_mocha
| | | |_mocha.css
| | | |_mocha.js
| |_runner
| | |_mocha.js
| |_spec

@espy
Copy link
Author

espy commented Sep 11, 2012

Someone else had the same issue: #348

I suggest we move over there, since his title actually references the problem :)

@paulirish
Copy link
Member

sounds good. closing as a dupe of #348

@dompuiu
Copy link

dompuiu commented Sep 16, 2012

Hi guys,

For me a similar case like the one described in the top post happens. I tried all the steps from below on a Windows 7 (64bits) machine. I followed the install steps listed here: http://www.decodize.com/css/installing-yeoman-front-end-development-stack-windows/. The install went perfect.

After install I create an empty folder and I init a new project:
$ yeoman init
// I provide the following answers: y,y,y,n,n
$ yeoman build

The build process seems to successful but in the CLI response I see :

Generating the cache manifest
  - Command: phantomjs C:\Users\dompuiu\AppData\Roaming\npm\node_modules\yeoman\lib\support\confess.js http://localhost:3501 appcache C:\Users\dompuiu\AppData\Roaming\npm\node_modules\yeoman\lib\support\confess.json

Writing to manifest.appcache...
Error: /scripts/main.js Not Found
    at Object.exports.error (C:\Users\dompuiu\AppData\Roaming\npm\node_modules\yeoman\node_modules\connect\lib\utils.js:43:13)
    at Object.errorHandler [as handle] (C:\Users\dompuiu\AppData\Roaming\npm\node_modules\yeoman\tasks\server.js:368:31)
    at next (C:\Users\dompuiu\AppData\Roaming\npm\node_modules\yeoman\node_modules\connect\lib\proto.js:190:15)
    at exports.send (C:\Users\dompuiu\AppData\Roaming\npm\node_modules\yeoman\node_modules\connect\lib\middleware\static.js:157:11)
    at Object.oncomplete (fs.js:297:15)
Error: Script error
http://requirejs.org/docs/errors.html#scripterror

  http://localhost:3501/scripts/vendor/9903151d.require.js:1818
  http://localhost:3501/scripts/vendor/9903151d.require.js:539 in onError
  http://localhost:3501/scripts/vendor/9903151d.require.js:1713
CACHE MANIFEST

# Time: Sun Sep 16 2012 22:33:52 GMT+0300 (GTB Daylight Time)
# This manifest was created by confess.js, http://github.com/jamesgpearce/confess
#
# Retrieved URL: http://localhost:3501/
# User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.12 Safari/535.11
#
# Config:
#  task: appcache
#  userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.12 Safari/535.11
#  wait: 0
#  consolePrefix: #
#  verbose: true
#  appcache:
#   urlsFromDocument: true
#   urlsFromRequests: false
#   cacheFilter: .*
#   networkFilter: null
#  url: http://localhost:3501
#  configFile: C:\Users\dompuiu\AppData\Roaming\npm\node_modules\yeoman\lib\support\confess.json

CACHE:
http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js
http://localhost:3501/img/glyphicons-halflings-white.png
http://localhost:3501/img/glyphicons-halflings.png
http://www.google-analytics.com/ga.js
scripts/main.js
scripts/vendor/9903151d.require.js
scripts/vendor/bootstrap/0dfe7678.bootstrap-transition.js
scripts/vendor/bootstrap/39af607e.bootstrap-affix.js
scripts/vendor/bootstrap/437cd036.bootstrap-scrollspy.js
scripts/vendor/bootstrap/4a691926.bootstrap-carousel.js
scripts/vendor/bootstrap/6e43b0d0.bootstrap-dropdown.js
scripts/vendor/bootstrap/810e2170.bootstrap-collapse.js
scripts/vendor/bootstrap/81453238.bootstrap-button.js
scripts/vendor/bootstrap/a1d23a70.bootstrap-modal.js
scripts/vendor/bootstrap/c6285e1a.bootstrap-tooltip.js
scripts/vendor/bootstrap/d23b5f74.bootstrap-typeahead.js
scripts/vendor/bootstrap/dab95585.bootstrap-tab.js
scripts/vendor/bootstrap/e9a9c103.bootstrap-popover.js
scripts/vendor/bootstrap/f64cf7f2.bootstrap-alert.js
scripts/vendor/cf69c6f2.modernizr.min.js
styles/db2a8ef1.main.css

Another thing that I noticed is that the JS files are not combined nor minified as you can see right above.

I tried the same steps on a Mac OS machine and everything was OK. No manifest error and the JS files were combined in one file and minified.

I know that you don't officially support the Windows build but I thought that you should know about this.

Thanks for all the great work you're doing!

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

No branches or pull requests

4 participants