首页 > 其他分享 >pnpm错误, ERR_PNPM_UNEXPECTED_STORE  Unexpected store location

pnpm错误, ERR_PNPM_UNEXPECTED_STORE  Unexpected store location

时间:2024-07-16 20:40:33浏览次数:8  
标签:UNEXPECTED Users ERR global location pnpm acer store

背景

 ERR_PNPM_UNEXPECTED_STORE  Unexpected store location

The dependencies at "C:\Users\acer\Code\Nuxt3\init\node_modules" are currently linked from the store at "C:\Users\acer\.hvigor\caches\v3".

pnpm now wants to use the store at "C:\Users\acer\AppData\Local\pnpm\global\5\.pnpm\v3" to link dependencies.

If you want to use the new store location, reinstall your dependencies with "pnpm install".

You may change the global store location by running "pnpm config set store-dir <dir> --global".
(This error may happen if the node_modules was installed with a different major version of pnpm)

如图
image

解决

说实话看到这玩意我一头雾水,于是马上就借助搜索引擎去了,甚至没看这段英文写了什么。
但是没有有用的回答,比较接近这个问题的是这篇:https://stackoverflow.com/questions/72196681/err-pnpm-err-pnpm-unexpected-pkg-content-in-store-the-lockfile-is-broken-a-full
于是看了一下报错写了什么。
大概的意思就是,你当前设置的存储库不是pnpm想要的,因此你需要设置他指出的那个存储库
比较有趣的是,这个.hvigor是之前华为deveco项目留下来的,现在ide都卸载了。

  1. 执行命令
pnpm config set store-dir <dir> --global

这个<dir>替换成他提示那个就行。
例如

pnpm config set store-dir C:\Users\acer\AppData\Local\pnpm\global\5\.pnpm\v3 --global
pnpm i

显示以下提示,输入y确认即可。

√ The modules directory at "C:\Users\acer\Code\Nuxt3\init\node_modules" will be removed and reinstalled from scratch. Proceed? (Y/n)

结语

确实是像他提示那样操作就行,过于简单以至于网络上都找不到答案。

标签:UNEXPECTED,Users,ERR,global,location,pnpm,acer,store
From: https://www.cnblogs.com/oldsaltfish/p/18306070

相关文章

  • OpenSNN推文:OpenAI 正在开发代号为“Strawberry”的新推理技术
    7月12日——据知情人士和路透社审查的内部文件称,ChatGPT制造商OpenAI正在一个代号为“Strawberry”的项目中研究其人工智能模型的新方法。该项目的细节此前未曾报道过,但微软支持的初创公司正在竞相证明其提供的模型类型能够提供高级推理能力。根据路透社5月份看到的......
  • GLM-4-9B-Chat WebDemo 部署报错:ValueError: too many values to unpack
    用开源大模型食用指南self-llm项目的GLM-4-9B-ChatWebDemo部署文档部署时遇到如下错误:ValueError:toomanyvaluestounpack(expected2)Traceback:File"/root/miniconda3/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py",line552,......
  • 完美解决ImportError: cannot import name ‘PILLOW_VERSION‘的正确解决方法,亲测有效
    完美解决ImportError:cannotimportname'PILLOW_VERSION’的正确解决方法,亲测有效!!!亲测有效完美解决ImportError:cannotimportname'PILLOW_VERSION'的正确解决方法,亲测有效!!!报错问题解决思路解决方法1.检查Pillow版本2.使用正确的版本检查方法3.更新代码示例......
  • NSIS 官方对安装包出现 NSIS Error 的解释与解决方案
    为什么我的安装包会出现NSISError(NSIS错误)?如果您是因为 nsis错误 消息搜索寻找答案到达本页面,说明您在安装程序时遇到了问题。下载的文件不完整或已被修改。虽然本页将概述基本解决方案:但首先还是请先联系您正在安装的程序的发布者或开发人员以获取完整的支持。这条消......
  • Pandas运行报错分析:ValueError: Length mismatch: Expected axis has 0 elements, new
    ✨✨欢迎大家来到景天科技苑✨✨......
  • Auto-GPT Command evaluate_code returned: Error: The model: `gpt-4` does not exis
    题意:Auto-GPT命令evaluate_code返回:错误:模型 gpt-4 不存在。问题背景:I'mworkingwith auto-gpt andIgotthiserror:Commandevaluate_codereturned:Error:Themodel:`gpt-4`doesnotexistandit'slikeitcan'tgofurthermore.whatshouldIdo?......
  • 【BUG】已解决:IndexError: list index out of range
     已解决:IndexError:listindexoutofrange欢迎来到英杰社区https://bbs.csdn.net/topics/617804998            欢迎来到我的主页,我是博主英杰,211科班出身,就职于医疗科技公司,热衷分享知识,武汉城市开发者社区主理人           擅长.net、C++、......
  • 基于 ROS 的 Terraform 托管服务轻松部署同城容灾应用
    介绍企业对在线的关键业务应用存在容灾需求,同城主机房发生故障,流量能切换到备机房,备机房具备实时接管能力。本方案介绍了通过阿里云的NLB、MSE、ACK等产品组合能力,实现应用同城多活的方案。资源编排服务(ResourceOrchestrationService,ROS)是阿里云提供基于基础设施即代码(Infras......
  • Windows Server 2022 中SQL查询报错:error setting locale info for codepage 65001(取
    解决问题:刚开始我以为是SQLServer升级过程中遇到错误,后面仔细检查错误日志,发现我忽略了一个重要的错误信息“Thecodepage65001isnotsupportedbytheserver.”,codepage65001对应的编码为UTF-8,而数据库排序规则为Chinese_PRC_CI_AS,对应的codepage为936。原来这台SQLSe......
  • Nuxt.js 错误侦探:useError 组合函数
    title:Nuxt.js错误侦探:useError组合函数date:2024/7/14updated:2024/7/14author:cmdragonexcerpt:摘要:文章介绍Nuxt.js中的useError组合函数,用于统一处理客户端和服务器端的错误,提供statusCode、statusMessage和message属性,示例展示了如何在组件中使用它来捕获和显......