angularjs сборка ани-темы не работает

На основании приведенных здесь инструкций

  1. Отсюда скачали zip-файл проекта ани-темы и извлекли содержимое zip-файла в C:\dev\angular\ani-theme-master
  2. Установленные npm, gulp и bower, вот информация о версии для каждого инструмента.

    C:\dev\angular\ani-theme-master>gulp -v 
    [12:49:20] CLI version 3.9.1
    [12:49:20] Local version 3.9.1
    C:\dev\angular\ani-theme-master>bower -v
    1.8.0
    C:\dev\angular\ani-theme-master>npm -v
    3.10.10
    
  3. Из командной строки перейдите в каталог C:\dev\angular\ani-theme-master
  4. установка беседки
        C:\dev\angular\ani-theme-master> установка bower
        UI-роутер bower#~0.2.13 кешируется github.com/angular-ui/ui-router.git#0.2.18
        bower ui-router#~0.2.13 проверяет 0.2.18 на github.com/angular-ui/ui-router.git#~0.2.13
        Бауэр json3#^3.3.0 кешируется github.com/bestiejs/json3.git#3.3.2
        Бауэр json3#^3.3.0 проверить 3.3.2 против github.com/bestiejs/json3.git#^3.3.0
        беседка угловая #^1.3.0 кешируется github.com/angular/bower-angular.git#1.6.4
        Бауэр угловой #^1.3.0 проверить 1.6.4 против github.com/angular/bower-angular.git#^1.3.0
        bower es5-shim#^4.0.0 кешируется github.com/es-shims/es5-shim.git#4.5.9
        bower es5-shim#^4.0.0 проверить 4.5.9 против github.com/es-shims/es5-shim.git#^4.0.0
        bower angular-mocks#~1.3.0, кэшированный github.com/angular/bower-angular-mocks.git#1.3.20
        bower angular-mocks#~1.3.0 проверяет 1.3.20 по github.com/angular/bower-angular-mocks.git#~1.3.0
        загрузчик bower #^3.2.0 кешируется github.com/twbs/bootstrap.git#3.3.7
        загрузчик bower #^3.2.0 проверяет 3.3.7 против github.com/twbs/bootstrap.git#^3.2.0
        bower angular-animate#~1.3.15        cached github.com/angular/bower-angular-animate.git#1.3.20
        bower angular-animate#~1.3.15 проверяет 1.3.20 против github.com/angular/bower-angular-animate.git#~1.3.15
        bower bootstrap-btn-outline-округлено #~0.0.3 кешировано github.com/sahusoftcom/bootstrap-btn-outline-ounded.git#0.0.4
        bower bootstrap-btn-outline-округлено #~0.0.3 проверить 0.0.4 против github.com/sahusoftcom/bootstrap-btn-outline-ounded.git#~0.0.3
        bower jquery#1.9.1 - 3 кэшированных github.com/jquery/jquery-dist.git#3.2.1
        Бауэр JQuery # 1.9.1 - 3 проверить 3.2.1 против github.com/jquery/jquery-dist.git#1.9.1 - 3
        беседка угловая # 1.3.20 кешируется github.com/angular/bower-angular.git#1.3.20
        Бауэр угловой # 1.3.20 проверить 1.3.20 против github.com/angular/bower-angular.git#1.3.20
        нижняя угловая дополнительная разрешающая способность Ненужное разрешение: угловая #1.3.14
        bower es5-shim#^4.0.0 установить es5-shim#4.5.9
        Бауэр json3#^3.3.0 установить json3#3.3.2
        bower ui-router#~0.2.13 установить ui-router#0.2.18
        беседка угловая # 1.3.20 установка угловая # 1.3.20
        загрузчик Bower #^3.2.0 установить загрузчик #3.3.7
        bower bootstrap-btn-outline-округлен #~0.0.3 установить bootstrap-btn-outline-округлен # 0.0.4
        Бауэр angular-mocks # ~ 1.3.0 установить angular-mocks#1.3.20
        bower angular-animate#~1.3.15                                                          install angular-animate#1.3.20
        Бауэр JQuery # 1.9.1 - 3 установить JQuery#3.2.1
        es5-shim#4.5.9 bower_components\es5-shim
        json3#3.3.2 bower_components\json3
        ui-router#0.2.18 bower_components\ui-router
        └── угловой № 1.3.20
        угловой #1.3.20 bower_components\angular
        начальная загрузка #3.3.7 bower_components\bootstrap
        Qu── jquery#3.2.1
        bootstrap-btn-контур-округленный #0.0.4 bower_components\bootstrap-btn-контур-округленный
        angular-mocks#1.3.20 bower_components\angular-mocks
        └── угловой № 1.3.20
        angular-animate#1.3.20 bower_components\angular-animate
        └── угловой № 1.3.20
        jquery#3.2.1 bower_components\jquery
        
  5. установка npm
    C:\dev\angular\ani-theme-master>npm install
    npm ПРЕДУПРЕЖДЕНИЕ необязательно Пропуск ОПЦИОНАЛЬНАЯ ЗАВИСИМОСТЬ: fsevents@^1.0.0 (node_modules \ chokidar \ node_modules \ fsevents): npm ПРЕДУПРЕЖДЕНИЕ notsup SKIPPING ДОПОЛНИТЕЛЬНАЯ ЗАВИСИМОСТЬ: неподдерживаемая платформа для fse 1.1.1: wanted {"os":"darwin","arch":"any"} (текущий: {"os":"win32","arch":"x64"})
  1. глоток

    C:\dev\angular\ani-theme-master>gulp build
    [23:42:56] Using gulpfile ~\ani-theme-master\gulpfile.js
    (node:9516) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
    [23:42:56] Starting 'clean'...
    [23:42:56] Finished 'clean' after 99 ms
    [23:42:56] Starting 'build'...
    [23:42:56] Starting 'jshint'...
    [23:43:01] Starting 'jscs'...
    [23:43:10] Starting 'styles'...
    [23:43:26] Starting 'images'...
    [23:43:26] Starting 'fonts'...
    [23:43:28] Starting 'extras'...
    [23:43:28] Finished 'build' after 32 s
    [23:43:29] Finished 'jshint' after 33 s
    [23:43:29] Finished 'jscs' after 28 s
    [23:43:30] Finished 'images' after 3.1 s
    [23:43:37] Finished 'styles' after 27 s
    [23:43:37] Starting 'html'...
    [23:43:53] Finished 'extras' after 25 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)
    at transform (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\index.js:20:11)
    at Transform._transform (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\index.js:68:25)
    at Transform._read (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_transform.js:184:10)
    at Transform._write (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_transform.js:172:12)
    at doWrite (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_writable.js:237:10)
    at writeOrBuffer (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_writable.js:227:5)
    at Transform.Writable.write (C:\dev\angular\ani-theme-master\node_modules\gulp-ng-annotate\node_modules\readable-stream\lib\_stream_writable.js:194:11)
    at Readable.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:96:13)
    at Readable.emit (events.js:188:7)
    

Кто-нибудь знает, почему эта ошибка происходит, я вижу, что установка npm показывает ошибку, что Unsupported platform для 32-разрядных и 64-разрядных fsevents. Могу ли я узнать, какой инструмент ищет 64-битную версию?

1 ответ

Надеюсь, я не опоздал на ответ

Попробуйте изменить if состояние в html Задача внутри gulpfile вот так:

 .pipe($.if('**/*.js', $.ngAnnotate()))
    .pipe($.if('**/*.js', $.uglify()))
    .pipe($.if('**/*.css', cssChannel()))
    .pipe(assets.restore())
    .pipe($.useref())
    .pipe($.if('**/*.html', $.minifyHtml({conditionals: true, loose: true})))
    .pipe(gulp.dest('docs'));
Другие вопросы по тегам