RE: Error in plugin 'metal-tools-soy'

thumbnail
Nader Jafari, modified 6 Years ago. Junior Member Posts: 84 Join Date: 8/24/11 Recent Posts
Hi guys
is am developing a custom CPContentListRenderer like commerce-theme-minium-impl that exist in liferay commerce source.

My project structure is like that but when i run gradle deploy tas this error shows in console :
Compiling soy
Error in plugin 'metal-tools-soy'
Message:
    Compile error:
errors during Soy compilation
C:\Liferay7\commerce-theme-sain\commerce-theme-sain-impl\node_modules\com.liferay.commerce.frontend.taglib\META-INF\resources\clay_table\CommerceTable.soy:89: error: Delegate template 'ClayTable.Cell' already has a default defined at C:\Liferay7\commerce-theme-sain\commerce-theme-sain-impl\node_modules\clay-table\src\ClayTable.soy:610:1.
{deltemplate ClayTable.Cell variant="'image'"}
^
1 error


Finished compiling soy
my packge.json :
{
    "dependencies": {
        "clay": "^2.14.2",
        "clay-icon": "^2.14.2",
        "clay-modal": "^2.14.2",
        "clay-pagination-bar": "^2.14.2",
        "clay-table": "^2.14.2",
        "metal": "^2.16.8",
        "metal-component": "^2.16.8",
        "metal-debounce": "^2.0.1",
        "metal-soy": "^2.16.8",
        "metal-state": "^2.16.8"
    },
    "devDependencies": {
        "babel-cli": "^6.26.0",
        "babel-preset-env": "^1.7.0",
        "check-source-formatting": "^2.0.14",
        "cross-env": "^5.2.0",
        "liferay-npm-bundler": "^2.6.2",
        "liferay-npm-bundler-preset-liferay-dev": "^1.1.7",
        "metal-tools-soy": "^6.0.0",
        "rimraf": "^2.6.3"
    },
    "name": "commerce-theme-sain-impl",
    "scripts": {
        "build": "npm run build:soy && npm run compile && liferay-npm-bundler && npm run cleanSoy",
        "build:soy": "metalsoy --soyDeps \"node_modules/+(clay-*|com.liferay.commerce.frontend.taglib)/**/*.soy\"",
        "checkFormat": "npm run csf",
        "cleanSoy": "rimraf src/**/*.soy.js",
        "compile": "cross-env NODE_ENV=production babel --source-maps -d classes/META-INF/resources src/main/resources/META-INF/resources",
        "csf": "csf src/**/*.js src/**/*.scss src/**/*.soy",
        "format": "npm run csf -- -i"
    },
    "version": "1.0.0"
}

my build.gradle :
dependencies {
    compileOnly group: "com.liferay", name: "com.liferay.application.list.api", version: "3.0.0"
    compileOnly group: "com.liferay", name: "com.liferay.frontend.js.loader.modules.extender.api", version: "2.0.0"
    compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib", version: "3.0.0"
    compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib.soy", version: "2.0.0"
    compileOnly group: "com.liferay", name: "com.liferay.petra.lang", version: "2.0.0"
    compileOnly group: "com.liferay", name: "com.liferay.petra.string", version: "2.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.account.api", version: "3.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.api", version: "7.1.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.cart.taglib", version: "2.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.currency.api", version: "1.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.frontend.api", version: "1.1.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.frontend.taglib", version: "2.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.price.list.api", version: "3.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.product.api", version: "7.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.product.content.api", version: "2.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.product.taglib", version: "1.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.product.type.grouped.api", version: "2.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.product.type.virtual.api", version: "2.0.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.taglib", version: "1.2.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.wish.list.api", version: "2.1.0"
    compileOnly group: "com.liferay.commerce", name: "com.liferay.commerce.frontend.taglib", version: "2.0.0"
    compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "3.3.0"
    compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "3.5.0"
    compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "3.0.0"
    compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.0"
    compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
    compileOnly group: "org.osgi", name: "org.osgi.core", version: "5.0.0"
    compileOnly group: "org.osgi", name: "org.osgi.service.cm", version: "1.5.0"
    compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0"

    jsCompile group: "com.liferay", name: "com.liferay.frontend.taglib.soy", version: "2.0.0"
    jsCompile group: "com.liferay.commerce", name: "com.liferay.commerce.frontend.taglib", version: "2.0.0"

//    jsCompile project(":apps:commerce:commerce-frontend-taglib")
}


Thank you emoticon
thumbnail
Nader Jafari, modified 6 Years ago. Junior Member Posts: 84 Join Date: 8/24/11 Recent Posts
in CommerceTable.soy:89  we have two {deltemplate ClayTable.Cell variant="'image'"} that exist with same name in clay-table\src\ClayTable.soy:610 .
when i change name of this deltemplate  to ClayTable1.Cell in CommerceTable.soy file and  run gradle deploy all soy templates compiled successfully.
this is a Bug?
thumbnail
Marco Leo, modified 6 Years ago. New Member Posts: 18 Join Date: 2/13/17 Recent Posts
Hi Nader try to use 2.10.0  for all clay dependencies.

Let me know
Marco
thumbnail
Nader Jafari, modified 6 Years ago. Junior Member Posts: 84 Join Date: 8/24/11 Recent Posts
Hi Marco
Thank you
this is resolved in 2.1.0 version