Tuesday, 2 May 2017

gulp annotate error when building AngularJS template

I'm new to gulp and node is not my backyard either so I'd need some help finding out what the problem is when I build a template form StartAngular.

I have downloaded the template and following the instructions in the readme to build it (I'm on a Mac with Sierra and brew) I run into the following error running gulp build:

(node:13596) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
[15:28:55] Starting 'clean'...
[15:28:56] Finished 'clean' after 20 ms
[15:28:56] Starting 'build'...
[15:28:56] Starting 'jshint'...
[15:28:56] Starting 'styles'...
[15:28:56] Starting 'images'...
[15:28:56] Starting 'fonts'...
[15:28:56] Starting 'extras'...
[15:28:56] Finished 'build' after 822 ms
[15:28:57] Finished 'jshint' after 1.15 s
[15:28:57] Finished 'images' after 407 ms
[15:28:58] Finished 'styles' after 1.82 s
[15:28:58] Starting 'html'...
[15:28:58] Finished 'extras' after 1.89 s

events.js:160
    throw er; // Unhandled 'error' event
    ^
Error: styles/main.css: error: couldn't process source due to parse 
error
Unexpected character '@' (1:0)

Tried so far

I have opened an issue here and I see that the template code is 2 years old and it's clear there are version issues causing this problem.

I have tried with node 4, 6 and 7 and also forcing the bower and npm dependencies to the minimum versions in the {package,bower}.json files without any success.

I have also looked into .tmp and I see styles/main.css there and it looks fine and indeed starts with the @ which should be fine.

I have also edited app/index.html to bit by bit comment out the failing parts because after this error I get several other issues related to stuff like so:

<!-- build:css(.tmp) styles/vendor.css -->
<!-- bower:css -->
<link rel="stylesheet" href="../bower_components/fontawesome/css/font-awesome.css" />
<link rel="stylesheet" href="../bower_components/angular-snap/angular-snap.css" />
<!-- endbower -->

Commenting out all these will of course not solve things but it just shows that all these similar directives fail for .js and .css.

I've also looked into gulpfile.js to try to understand what is going on but nothing enlightening so far.

Google also seems to give all kinds of suggestions under the sun which I tried a few without success and it's not clear what part really fails either.

I'd like to get this template to work so and make a PR to fix things and I'd appreciate any help form you here :) Thanks!



via murrekatt

No comments:

Post a Comment