首页 > 其他分享 >uniapp+vue3+ts 使用pinia报错

uniapp+vue3+ts 使用pinia报错

时间:2023-06-01 11:57:28浏览次数:39  
标签:node uniapp mjs modules 报错 pinia vue3 npm

"hasInjectionContext" is not exported by "node_modules/vue-demi/lib/index.mjs", imported by "node_modules/pinia/dist/pinia.mjs". 11:36:19.397 at ../node_modules/pinia/dist/pinia.mjs:6:9

 

解决方法:

把pinia 降级 

先删除pinia

npm uni pinia

再重新安装

npm i [email protected] --save -D

标签:node,uniapp,mjs,modules,报错,pinia,vue3,npm
From: https://www.cnblogs.com/zyfenblog/p/17448523.html

相关文章

  • vue3 ts elementplus行头加el-tooltip
    <!--vue3tselementplus行头加el-tooltip--><el-table-columnalign="left"><template#header><el-tooltipclass="box-item"effect="dark"con......
  • Python安装软件包报错 fatal error: Python.h: No such file or directory
    原因是我们安装的这个第三方库内含需要编译的调用pythonapi的c/c++文件,而linuxlinux发行版通常会把类库的头文件和相关的pkg-config分拆成一个单独的xxx-dev(el)包。以python为例,以下情况你是需要python-dev的:ubuntu下apt-getinstallpython-devapt-getinstallpython3-d......
  • uniapp uni-number-box组件 步长为1,还能输入小数思路分享
    正常情况,输入了步长为1,是无法在输入小数的。需求是要能输入一位小数,但如果直接步长设为0.1,又不能按1这样递增,输入数量上用起来肯定很麻烦。于是我就想了一个折中方法,步长设为:1.01,然后值改变的时候,change事件里,四舍五入,保留一位小数,这样就能实现点击输入框左右的加减,页面显示的......
  • Flutter导入第三方包后报错The number of method references in a .dex file cannot e
    报错导入just_audio:^0.9.34后编译报错。报错内容如下:ERROR:D8:Cannotfitrequestedclassesinasingledexfile(#methods:71340>65536)com.android.builder.dexing.DexArchiveMergerException:Errorwhilemergingdexarchives:Thenumberofmethodreference......
  • uniapp专题学习(三)
    前言在uniapp专题学习(二)中学习到的知识点有viedo组件、form表单组件、navigator路由跳转以及page.json中的tabBar配置。vue语法之计算属性computed每一个计算属性都包含一个getter和一个setter,默认是利用getter来读取。所有getter和setter的this上下文自动地绑定为......
  • QA|外部调用类方法总报错missing 1 required positional argument:'self'|UI自动化
    外部调用类方法总报错missing1requiredpositionalargument:'self' 原因:实例化这个类实例化错了,少了括号()解决:改成如下就可以了 参考学习:调用类方法时报错:missing1requiredpositionalargument:'self'-hehehe_wy7-博客园(cnblogs.com) ......
  • [Slide] 解决Slidev export导出pdf报错
    解决Slidevexport导出pdf报错问题按照Slidev的官方文档使用导出为pdf需要安装playwright-chromium官网安装方法如下:npmi-Dplaywright-chromium在我电脑上执行安装后直接执行导出命令sudoslidevexport,显示报错如下:Slidevv0.42.1(global)theme@slidev/......
  • bitsandbytes通过源码安装后调用报错AttributeError: module 'bitsandbytes.nn' has n
    通过github下载的源码使用pipinstall-e.方式安装的时候会出现题目中的问题。这个时候先卸载掉bitsandbytes,然后重新使用pipinstallbitsandbytes安装,这种方式直接从仓库中安装,问题就解决了。目前尚不清楚问题出现原因,虽然两种方式的安装版本都是0.38.1......
  • uniapp onShareAppMessage里面请求后调分享(微信小程序)
    onShareAppMessage(){constpromise=newPromise(resolve=>{request({api:'请求名',method:'POST',data:{"data":{}}}).then(res=>{resolve({......
  • vue3 整数还是显示整数,有小数的保留两位小数显示,写一个指令
    1、新建number-format.tsimport{Directive,DirectiveBinding}from"vue";constnumberFormat:Directive={ mounted(el,binding:DirectiveBinding){  constvalue=binding.value.text||"0";  constparsedValue=parseFloat(valu......