留言板

Theme build error _custom.scss vs custom.css

thumbnail
Abre Chase,修改在6 年前。

Theme build error _custom.scss vs custom.css

New Member 帖子: 12 加入日期: 17-2-7 最近的帖子
My organization purchased the Ace theme from themeray and we're trying to build from the source they provided. It looks the theme source was provided in the 6.x plugins-sdk format, because it contains the docroot/_diffs structure.

I followed the instructions to migrate this the 7.x / gradle / gulp / etc structure and that seemed to have worked. However, I am unable to build the theme under either the plugins-sdk or migrated version. The error is:


     [echo] Parsed /css/aui.scss in 1293ms
     [echo] Exception in thread "main" com.liferay.sass.compiler.jni.internal.JniSassCompilerException: Error: It's not clear which file to import for '@import "custom"'.
     [echo]        Candidates:
     [echo]          _custom.scss
     [echo]          custom.css
     [echo]        Please delete or rename all but one of these files.
     [echo]         on line 19 of docroot/css/main.scss
     [echo] >> @import "custom";
     [echo]    ^
     [echo] 	at com.liferay.sass.compiler.jni.internal.JniSassCompiler.compileFile(JniSassCompiler.java:107)
     [echo] 	at com.liferay.css.builder.CSSBuilder._parseSass(CSSBuilder.java:350)
     [echo] 	at com.liferay.css.builder.CSSBuilder._parseSassFile(CSSBuilder.java:364)
     [echo] 	at com.liferay.css.builder.CSSBuilder.execute(CSSBuilder.java:161)
     [echo] 	at com.liferay.css.builder.CSSBuilder.main(CSSBuilder.java:109)


It looks like the _custom.scss file is created as part of the build process because it doesn't exist in the source.

Can anyone provide advice for what is happening here and how we might be able to work around it to get a clean build of the theme?
A Hügel,修改在6 年前。

RE: Theme build error _custom.scss vs custom.css

New Member 帖子: 4 加入日期: 15-7-27 最近的帖子
I am seeing that same problem in maven using com.liferay.css.builder when building a theme based on _unstyled


[ERROR] Failed to execute goal com.liferay:com.liferay.css.builder:1.1.1:build (default-build) on project daimler-theme: Error: It's not clear which file to import for '@import "atlas-theme/main"'.
[ERROR] Candidates:
[ERROR] atlas-theme/main.scss
[ERROR] atlas-theme/main.css
[ERROR] Please delete or rename all but one of these files.
[ERROR] on line 13 of theme/target/daimler-theme-0.2.14/css/aui/lexicon/atlas.scss
[ERROR] >> @import "atlas-theme/main";
thumbnail
Andrew Jardine,修改在6 年前。

RE: Theme build error _custom.scss vs custom.css

Liferay Legend 帖子: 2416 加入日期: 10-12-22 最近的帖子
I don't necessarily have the answer to this one, but I do have advice -- contact the seller.

Just note that the Plugins SDK is still supported in 7. I noticed on the marketplace page that there is version support reference up there for 7.0 GA2 -- so maybe you have the wrong source, the wrong version?
thumbnail
Abre Chase,修改在6 年前。

RE: Theme build error _custom.scss vs custom.css

New Member 帖子: 12 加入日期: 17-2-7 最近的帖子
The theme vendor was unable to help us resolve the problem. The packaged theme they provided does work at runtime, but we're unable to use the source and make any changes. I had the same problems with other 6.x themes that I tried to migrate to 7.x using the tools.
thumbnail
Andrew Jardine,修改在6 年前。

RE: Theme build error _custom.scss vs custom.css

Liferay Legend 帖子: 2416 加入日期: 10-12-22 最近的帖子
From my experience, the theme upgrading tools between versions have never taken me all the way. I've always had to get in there and do something to get it to work -- be it to deploy, or to render properly. The part that is a little confusing to me is that, according to the marketplace, there is a version of that theme that is available for 7 GA2. So I would expect that you could start with that one which would save you, at least, the step of having to upgrade from 6.x -> 7.