-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
grunt build not populating vendor.js #164
Comments
I'm not great with Grunt, but here's my Gruntfile, I'd appreciate tips on what I might be missing. |
I'll need the console log after running the |
@DaftMonk Updated my gist, here's the output. |
Hmm, there doesn't seem to be anything obviously wrong with the log. Could you check that the '.tmp/concat/scripts/vendor.js' file is not empty? |
@DaftMonk it's empty as well. |
Ah now I see the problem.
Its looking for This is because the angular generator has a slightly different file structure, so the usemin paths in their index.html are different. Change your build tags to:
|
@DaftMonk Thanks, that worked. |
I also had the same problem, following upgrade of
|
On my app I needed to switch to
because my bwoer_compents dir is per default in /bower_components. So any explainations what I did wrong? |
@dei79 what are the contents of your |
I had the exact same problem as @dei79 and switching to
|
This is the content of my bowerrc
I tried also other locations e.g. app/bower_components but this ends up with a corrupt path in the index.html |
This problem still exists, but the solution is now to not include (app) in the build tags, but to instead include (./) in the build tags. And this fix is required for both the vendor.js and vendor.css files. The updated tags in index.html would then look like: <!-- build:js(./) scripts/vendor.js -->
<!-- bower:js -->
...
<!-- endbower -->
<!-- endbuild --> AND <!-- build:css(./) styles/vendor.css -->
<!-- bower:css -->
...
<!-- endbower -->
<!-- endbuild --> Looks like this issue is still open, but the fix is no big deal. |
The problem comes from the last release where the bower_components directory has been moved the /project_root directory (see https://github.com/yeoman/generator-angular/blob/master/CHANGELOG.md#breaking-changes). A quick and simple patch is to add the /project_root directory as an alternate path to the vendor.js useminPrepare block. @dei79 's |
@jrmlstf works for me 👍 |
<!-- build:js(app/..) scripts/vendor.js --> also works for me |
This worked for me. |
tried above but still had issues with main.css. What worked finally was following: for styles for scripts |
Hello, I have update my index.html with:
...
and if I run: but when I try to deploy on Heroku I dont know what happen, but doesnt work. I have my vendor.css and vendor.js empty (this is the url: http://eahtest.herokuapp.com/ ) Thank you in advance!! |
@wikett have you tried the approaches mentioned above? Try this:
|
@AnalogWeapon I have tried your approach but doesnt work :S |
Same issue here, with the newest version of generator-angular |
@madskonradsen Could you explain your specific issue a bit more? Are you using 2.0 of the angular-fullstack generator? |
@DaftMonk Oh yeah, sorry! my vendor.js-file comes out empty when i run "grunt build" |
The (I was using generator-angular 0.9.0-1...) |
I'm sorry! I thought that generator-angular was updated to the new version... It worked perfectly after updating... |
I have the same issue. The generated vendor.js file is blank. I did a gist https://gist.github.com/stephaneeybert/ada08c9917fad44a8e38 |
@stephaneeybert you should update the generator: There is a much newer version :) |
@stephaneeybert and while you're at it you'll probably want to run |
@kingcody I did and it went fine, somewhat silent. On the other hand the second command was very verbose. I then ran a grunt build again, only to have the same issue. Thanks anyway for the updating tip. |
I was also getting the "Uncaught ReferenceError: angular is not defined" after trying to set everything up, but doing a quick "grunt build" fixed it. Now everything is working! My question is, I won't have to constantly enter this command in correct? (Let's say I'm adding some new files / etc) |
I spent lots and lots of frustrated days because of this. I am using generator-angular-fullstack version 3.0.2. For me the css files in the routes were getting loaded fine |
I have spent a day on this as well on version 3.1.1. If anyone still has this problem see if you have a space between: |
I've been trying to deploy my app to heroku using the given steps, but unfortunately, my
dist/public/scripts/*.vendor.js
is completely empty (and as a result I get this error:Uncaught ReferenceError: angular is not defined 5ee656d2.scripts.js:1
). I took the code block below from myindex.html
and I haven't modified my Gruntfile since generating the project. What am I missing?One thing to note: I did start the project with just the yeoman angular generator, and then merged in the angular-fullstack later on... my app works fine locally, but is that where the issue is coming from?
What would be really cool is if components like angular could have a CDN url specified in production, with these files being the fallback.
The text was updated successfully, but these errors were encountered: