liferay / liferay-theme-tasks

A set of tasks for building and deploying Liferay Portal themes.
18 stars 24 forks source link

Deploying a theme extending a published themelet fails on node v0.10 #10

Closed mjbradford89 closed 8 years ago

mjbradford89 commented 8 years ago
  1. Make sure node is version 0.10.25
  2. run gulp extend and then select Themelet, Search npm registry (published modules), and a themelet.
  3. run gulp deploy from your theme.

The theme should deploy, but instead I get the following error from gulp:

[15:47:46] Using gulpfile ~/Downloads/Workshop/Workshop/Themes/generated-theme/gulpfile.js
[15:47:46] Starting 'deploy'...
[15:47:46] Starting 'build'...
[15:47:46] Starting 'build:clean'...
[15:47:46] Finished 'build:clean' after 160 ms
[15:47:46] Starting 'build:base'...
[15:47:47] Finished 'build:base' after 686 ms
[15:47:47] Starting 'build:src'...
[15:47:47] Finished 'build:src' after 12 ms
[15:47:47] Starting 'build:web-inf'...
[15:47:47] Finished 'build:web-inf' after 4.46 ms
[15:47:47] Starting 'build:hook'...
[15:47:47] Finished 'build:hook' after 8.16 ms
[15:47:47] Starting 'build:themelets'...
[15:47:47] Starting 'build:themelet-css'...
[15:47:47] Starting 'build:themelet-images'...
[15:47:47] Starting 'build:themelet-js'...
[15:47:47] Starting 'build:themelet-templates'...
[15:47:47] Finished 'build:themelet-images' after 4.64 ms
[15:47:47] Finished 'build:themelet-js' after 3.13 ms
[15:47:47] Finished 'build:themelet-templates' after 2.46 ms
[15:47:47] Finished 'build:themelet-css' after 9.48 ms
[15:47:47] Starting 'build:themelet-css-inject'...
[15:47:47] Starting 'build:themelet-js-inject'...

/home/michael/Downloads/Workshop/Workshop/Themes/generated-theme/node_modules/liferay-theme-tasks/tasks/themelet.js:46
            return Promise.resolve();
                   ^
ReferenceError: Promise is not defined
  at /home/michael/Downloads/Workshop/Workshop/Themes/generated-theme/node_modules/liferay-theme-tasks/tasks/themelet.js:46:11

I looked up when native support for promises was introduced into Node and it looks like it was 0.11.13, which makes sense. Not sure if a solution is really needed for this issue, just thought it should be logged.

robframpton commented 8 years ago

I rolled back a couple of dependencies that were implementing native Promises, so things are now working for legacy versions of Node.