Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Cannot grunt build app without running into errors #632

Closed
georaldc opened this issue Jan 15, 2016 · 5 comments
Closed

Cannot grunt build app without running into errors #632

georaldc opened this issue Jan 15, 2016 · 5 comments

Comments

@georaldc
Copy link

Was testing this to build a simple site and after installing and running the generator (which ran fine without any errors), grunt build would abort, probably due to the following:

Running "useminPrepare:html" (useminPrepare) task
Warning: An error occurred while processing a template (Unexpected token )). Use --force to continue.
@georaldc
Copy link
Author

Oh, I guess adding the --force flag makes it complete the build process, but it runs into another warning on the way:

Running "imagemin:dist" (imagemin) task
Warning: An error occurred while processing a template (Unexpected token )). Used --force, continuing.

@stefanmeschke
Copy link

I think the problem is that the useminPrepare:html task is done after cleaning the dist directory and there is no html file to prepare. Same problem on the imagemin:dist task: no images the error occured?

@tsck
Copy link
Contributor

tsck commented Jan 22, 2016

I believe the problem was that there were extra '%' characters added to the closing tags in the imagemin task.

Was:

cwd: '<%%= config.app %%>',
src: '*.{ico,png}',
dest: '<%%= config.dist %%>'

Fixed:

cwd: '<%%= config.app %>',
src: '*.{ico,png}',
dest: '<%%= config.dist %>'

I issued a pull request as per the above, just wanted to post it here for anyone having issues with this. Just delete those extra '%' characters and the build task should work.

@RonanCodes
Copy link

Brilliant, it's working now.
The Yo Webapp setup still contains the error.

@silvenon
Copy link
Member

Released in v1.1.2.

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

5 participants