> 文档中心 > 问题求解 Execution failed for task ‘:entry:compileDebugJsWithNode‘.> entry-default build js failed.

问题求解 Execution failed for task ‘:entry:compileDebugJsWithNode‘.> entry-default build js failed.

我使用了自定义组件toolBar,在common中定义了tabbarltem.js,也将自定义组件导入了各个页面,结果就宝这样的错误,有谁可以解答一下吗?

tabbarItem.js

//图片绝对路径//common.datas.tabbarItem.jsexport default [    { img: 'common/Icon/wx.png', simg: 'common/Icon/wx1.png', name: '微信'    },    { img: ' common/Icon/txl.png', simg: ' common/Icon/txl1. png', name: '通讯录'    },    { img: 'common/Icon/fx.png', simg: 'common/Icon/fx1.png', name: '发现'    },    { img: 'common/Icon/w.png', simg: ' common/Icon/w1.png', name: '我的'    },]

 toolBar.js

import router from ' @system. router';export default {    data: { tabbarItems    },    //父组件传遠props:["index"],    props: { index: {     type: Number }, default() {     return 0; }    },    jummp(index) { switch (index) {     case 0:  router.push({      uri: "pages/ shouye/ shouye",  });  break;     case 1:  router.push({      uri: "pages/ tongxunlu/ tongxunlu",  });  break;     case 2:  router.push({      uri: "pages/ faxian/ faxian",  });  break;     case 3:  router.push({      uri: "pages/ wode/ wode",  });  break; }    }}

 faxian.hml(其中的一个例子)

Hello {{ title }}

 config.json

{  "app": {    "bundleName": "com.example.myapplicationtwo",    "vendor": "example",    "version": {      "code": 1000000,      "name": "1.0.0"    }  },  "deviceConfig": {    "default": {      "process": "com.huawei.hiworld.example",      "supportBackup": false,      "network": { "cleartextTraffic": true, "securityConfig": {   "domainSettings": {     "cleartextPermitted": true,     "domains": [{  "name": "api.seniverse.com"}     ]   } }      }    }  },  "module": {    "reqPermissions": [      { "name": "ohos.permission.GET_NETWORK_INFO"      },      { "name": "ohos.permission.SET_NETWORK_INFO"      },      { "name": "ohos.permission.INTERNET"      }    ],    "package": "com.example.myapplicationtwo",    "name": ".MyApplication",    "mainAbility": "com.example.myapplicationtwo.MainAbility",    "deviceType": [      "phone"    ],    "distro": {      "deliveryWithInstall": true,      "moduleName": "entry",      "moduleType": "entry",      "installationFree": false    },    "abilities": [      { "skills": [   {     "entities": ["entity.system.home"     ],     "actions": ["action.system.home","action.second"     ]   } ], "visible": true, "name": "com.example.myapplicationtwo.MainAbility", "icon": "$media:icon", "description": "$string:mainability_description", "label": "$string:entry_MainAbility", "type": "page", "launchType": "standard"      },      { "name": "com.example.myapplicationtwo.toolBar", "icon": "$media:icon", "description": "$string:toolbar_description", "label": "$string:entry_toolBar", "type": "page", "launchType": "standard"      }    ],    "js": [      { "pages": [   "pages/index/index",   "pages/shouye/shouye",   "components/toolBar/toolBar",   "pages/tongxunlu/tongxunlu",   "pages/faxian/faxian",   "pages/wode/wode" ], "name": "default", "window": {   "designWidth": 720,   "autoDesignWidth": true }      }    ]  }}