首页 > 编程语言 >微信小程序报错:Component is not found in path "components/comp/comp.js"

微信小程序报错:Component is not found in path "components/comp/comp.js"

时间:2024-09-08 20:39:46浏览次数:1  
标签:index .. comp Component js 报错 components 微信

完整错误

jsEnginScriptError:
Component is not found in path "components/comp/comp.js" (using by pages/index/index); onAppRoute
Error: Component is not found in path "components/comp/comp.js" (using by pages/index/index)
	in e(...)
	...

错误代码(json)

{
  "backgroundTextStyle": "light",
  "navigationBarBackgroundColor": "#fff",
  "navigationBarTitleText": "WeApp",
  "navigationBarTextStyle": "black",
  "usingComponents": {
    "MyComp": "../../components/comp/comp.js"
  }
}

解决

去掉.js, 改为../../components/comp/comp

{
  "backgroundTextStyle": "light",
  "navigationBarBackgroundColor": "#fff",
  "navigationBarTitleText": "WeApp",
  "navigationBarTextStyle": "black",
  "usingComponents": {
    "MyComp": "../../components/comp/comp"
}

标签:index,..,comp,Component,js,报错,components,微信
From: https://www.cnblogs.com/stanleys/p/18403378/wmp-component-not-found

相关文章

  • 为什么微信小程序设置的onPullDownRefresh无效
    因为仅有onPullDownRefresh是不行的,需要配置:如果是单个页面需要onPullDownRefresh,在对应页面的json文件中设置"enablePullDownRefresh":true,如:{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigation......
  • 微信小程序 云数据库 Collection/Query .orderBy 用法
    Collection.orderBy/Query.orderBy指定查询排序条件方法签名如下:functionorderBy(fieldName:string,order:string):Collection|Query方法接受一个必填字符串参数fieldName用于定义需要排序的字段,一个字符串参数order定义排序顺序。order只能取asc或desc。如果需要......
  • 微信小程序报错:Component is not found in path "components/comp/comp.js"
    完整错误jsEnginScriptError:Componentisnotfoundinpath"components/comp/comp.js"(usingbypages/index/index);onAppRouteError:Componentisnotfoundinpath"components/comp/comp.js"(usingbypages/index/index) ine(...) ...错误......
  • SC3060: Computer Graphics and Visualization
    SC3060:ComputerGraphicsandVisualizationSWLaborYourOwn ComputerMaking Images with MathematicsLab Experiments 1- 5SESSION 2024/2025SEMESTER 1COMPUTERSCIENCECOURSEMAKING IMAGESWITH MATHEMATICS1. OBJECTIVEInthiscourseworkyou w......
  • 在微信小程序中做自己的数字键盘
    为什么要自制键盘?我最近在开发一款微信小程序,现在需要用户输入一个数字。使用系统键盘带来的不便如果使用系统键盘,有以下几个问题:数字键太小,不方便;无法阻止用户输入不合法字符(如:“&”);小数点在一些手机上很难找到;用户需要点击输入框;无法控制按钮样式。理想的自制键盘效......
  • 使用微信小程序-云开发时报错: Error: errCode: -401003 api parameter type error |
    错误Uncaught(inpromise)thirdScriptErrorerrCode:-401003apiparametertypeerror|errMsg:parameter.datashouldbeobjectinsteadofundefined;Error:errCode:-401003apiparametertypeerror|errMsg:parameter.datashouldbeobjectinsteadofundef......
  • Applications of UDTL to Intelligent Fault Diagnosis: A Survey and Comparative St
    文章目录摘要一、引言二、背景和定义A.UDTL定义B.基于UDTL的IFD分类C.基于UDTL的IFD动机D.主干结构三、LABEL-CONSISTENTUDTLA.基于网络的UDTLB.基于实例化的UDTLC.基于映射的UDTLD.基于对抗性的IFD四.LABEL-INCONSISTENTUDTLA.PartialUDTLB.OpenSetUDTLC.Uni......
  • 基于Pinia和Compute的持久化localStorage登录态管理Vuejs 源码教学
    piniaPinia是一个专为Vue3设计的状态管理库,它借鉴了Vuex的一些概念,但更加轻量灵活,使得状态管理变得更加简单直观。Pinia通过提供一种基于Vue3响应式API的状态管理机制,让我们可以更加优雅地管理应用程序的状态。computedVue的computed属性是一种特殊的数据属性,它们根据组......
  • Pipeline流水线通过git拉取Jenkinsfile报错 error: RPC failed; result=22, HTTP code
    Pipeline流水线通过git拉取Jenkinsfile报错error:RPCfailed;result=22,HTTPcode=404在学习共享库时使用通过git拉取jenkinsfile时,报错在排查gitlab服务状态,网络通讯,防火墙规则以及Jenkins凭据均可以正常使用,最后发现的时在URL填写中缺少.git结尾所导致的,在了解后得知在......
  • 运用DBLINK与数据泵导数据时报错ORA-39006、ORA-39113、PLS-00352、PLS-00201、ORA-39
    问题描述:运用DBLINK与数据泵导数据时报错ORA-39006、ORA-39113、PLS-00352、PLS-00201、ORA-39097,如下所示:数据库:源端oracle12.2.0.1目标端:oracle12.2.0.11、问题重现[oracle@hisdb1scripts]$tail-500fnohup.outImport:Release12.2.0.1.0-ProductiononFriSep......