Ошибка Error: BEMHTML при сборке с помощью gulp
Closed this issue · 0 comments
При запуске сборки с помощью gulp появляется ошибка:
{ Error: BEMHTML error: TypeError: file.data.apply is not a function at /home/pavel/dev/experiments/bem01/node_modules/gulp-bem-xjst/index.js:122:19 at tryCatch (/home/pavel/dev/experiments/bem01/node_modules/gulp-bem-xjst/index.js:157:12) at /home/pavel/dev/experiments/bem01/node_modules/gulp-bem-xjst/index.js:119:22 at Array.forEach (<anonymous>) at /home/pavel/dev/experiments/bem01/node_modules/gulp-bem-xjst/index.js:116:25 at <anonymous> at process._tickCallback (internal/process/next_tick.js:118:7) name: 'Error', message: 'BEMHTML error: TypeError: file.data.apply is not a function', stack: 'Error: BEMHTML error: TypeError: file.data.apply is not a function\n at /home/pavel/dev/experiments/bem01/node_modules/gulp-bem-xjst/index.js:122:19\n at tryCatch (/home/pavel/dev/experiments/bem01/node_modules/gulp-bem-xjst/index.js:157:12)\n at /home/pavel/dev/experiments/bem01/node_modules/gulp-bem-xjst/index.js:119:22\n at Array.forEach (<anonymous>)\n at /home/pavel/dev/experiments/bem01/node_modules/gulp-bem-xjst/index.js:116:25\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:118:7)', showStack: false, showProperties: true, plugin: 'gulp-bem-xjst' }
Сборка проходит успешно, если в файле
./node_modules/gulp-bem-xjst/index.js
в строке 120
заменим return file.data.apply(bemjsonFile.data);
на return file.data.bemhtml.apply(bemjsonFile.data);