首页 > 解决方案 > 我如何将主题从 6.2 升级到 7.2?

问题描述

当我从 6.2 运行 gulp 升级到 7.0 时,我收到以下错误:

C:\LiferayThemes\workspace\TestThemes\rev-theme>gulp upgrade
[16:54:09] Using gulpfile C:\LiferayThemes\workspace\TestThemes\rev-theme\gulpfile.js
[16:54:09] Starting 'upgrade'...
? We recommend creating a backup of your theme files before proceeding. Are you sure you wish to start the upgrade process? Yes
[16:54:13] Starting 'upgrade:black-list'...
[16:54:13] Finished 'upgrade:black-list' after 61 ms
[16:54:13] Starting 'upgrade:replace-compass'...
[16:54:13] Finished 'upgrade:replace-compass' after 37 ms
[16:54:13] Starting 'upgrade:convert-bootstrap'...
C:\LiferayThemes\workspace\TestThemes\rev-theme\node_modules\convert-bootstrap-2-to-3\lib\formatters\css.js:61
                                if (str.indexOf('content-box') > -1) {
                                        ^

TypeError: str.indexOf is not a function
    at constructor._checkPadding (C:\LiferayThemes\workspace\TestThemes\rev-theme\node_modules\convert-bootstrap-2-to-3\lib\formatters\css.js:61:13)
    at constructor._extractRecursive (C:\LiferayThemes\workspace\TestThemes\rev-theme\node_modules\convert-bootstrap-2-to-3\lib\formatters\css.js:247:6)
    at constructor.format (C:\LiferayThemes\workspace\TestThemes\rev-theme\node_modules\convert-bootstrap-2-to-3\lib\formatters\css.js:23:14)
    at CLI.processFileData (C:\LiferayThemes\workspace\TestThemes\rev-theme\node_modules\convert-bootstrap-2-to-3\lib\cli.js:181:28)
    at CLI.formatFile (C:\LiferayThemes\workspace\TestThemes\rev-theme\node_modules\convert-bootstrap-2-to-3\lib\cli.js:80:9)
    at CLI.onRead (C:\LiferayThemes\workspace\TestThemes\rev-theme\node_modules\convert-bootstrap-2-to-3\lib\cli.js:126:9)
    at wrapper (C:\LiferayThemes\workspace\TestThemes\rev-theme\node_modules\convert-bootstrap-2-to-3\node_modules\lodash\index.js:3533:19)
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)

主题是通过 yo 从 6.2 项目导入的。当我设法升级空主题时,似乎 gulp 安装正确。

我应该改变什么?

提前谢谢你!

标签: liferayliferay-7liferay-theme

解决方案


推荐阅读