当前位置: 首页 > news >正文

pnpm常见报错解决办法

PS D:\code\gitlab\manus-web> pnpm add -D @types/framer-motion --save-exact --config.strict-peer-deps=false
Debugger attached.
 WARN  deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
 ERR_PNPM_FETCH_404  GET https://registry.npmjs.org/@types%2Fframer-motion: Not Found - 404

This error happened while installing a direct dependency of D:\code\gitlab\manus-web

@types/framer-motion is not in the npm registry, or you have no permission to fetch it.

No authorization header was set for the request.
Progress: resolved 63, reused 63, downloaded 0, added 0
Waiting for the debugger to disconnect...
PS D:\code\gitlab\manus-web> # 删除错误安装尝试
>> pnpm remove @types/framer-motion
>>
>> # 安装官方主库(自动包含类型声明)
>> pnpm add framer-motion@10.18.0
Debugger attached.
 ERR_PNPM_CANNOT_REMOVE_MISSING_DEPS  Cannot remove '@types/framer-motion': no such dependency found

Available dependencies: @radix-ui/react-dialog, @tailwindcss/postcss, @types/eslint, @types/markdown-it, @types/node, @types/react, @types/react-dom, @types/react-syntax-highlighter, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint, eslint-config-next, framer-motion, postcss, prettier, prettier-plugin-tailwindcss, raw-loader, tailwindcss, typescript, @ant-design/icons, @ant-design/v5-patch-for-react-19, @ant-design/x, @codemirror/lang-json, 
@codemirror/lang-python, @codemirror/lint, @formily/core, @formily/react, @radix-ui/react-accordion, @radix-ui/react-dropdown-menu, @radix-ui/react-scroll-area, @radix-ui/react-slot, @radix-ui/react-tooltip, @react-hookz/web, @t3-oss/env-nextjs, @uiw/codemirror-theme-material, @uiw/react-codemirror, ahooks, antd, best-effort-json-parser, class-variance-authority, classnames, clsx, geist, immer, katex, lru-cache, lucide-react, markdown-it, motion, nanoid, next, next-transpile-modules, react, react-dom, react-markdown, react-syntax-highlighter, rehype-katex, remark-gfm, remark-math, tailwind-merge, tw-animate-css, zod, zustand
Waiting for the debugger to disconnect...
Debugger attached.
 WARN  deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
 WARN  6 deprecated subdependencies found: @humanwhocodes/config-array@0.13.0, @humanwhocodes/object-schema@2.0.3, @react-hookz/deep-equal@3.0.3, glob@7.2.3, inflight@1.0.6, rimraf@3.0.2
Packages: +5
+++++
Progress: resolved 788, reused 741, downloaded 3, added 5, done
 WARN  Issues with peer dependencies found
.
├─┬ framer-motion 10.18.0
│ ├── ✕ unmet peer react@^18.0.0: found 19.1.0
│ └── ✕ unmet peer react-dom@^18.0.0: found 19.1.0
└─┬ ahooks 3.8.4
  └── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.1.0

devDependencies:
- framer-motion 12.7.4
+ framer-motion 10.18.0 (12.0.1 is available) already in devDependencies, was not moved to dependencies.

 EPERM  EPERM: operation not permitted, rename 'D:\code\gitlab\manus-web\package.json.832231132' -> 'D:\code\gitlab\manus-web\package.json'


Waiting for the debugger to disconnect...
PS D:\code\gitlab\manus-web> pnpm run build                                                               
Debugger attached.

> langmanus-web@0.1.0 build D:\code\gitlab\manus-web
> next build

Debugger attached.
   ▲ Next.js 15.2.2
   - Environments: .env.local, .env
   - Experiments (use with caution):
     · cpus: 4

   Creating an optimized production build ...
\dist\build\webpack\loaders\next-flight-css-loader.js??ruleSet[1].rules[13].oneOf[5].use[0]!D:\code\gitlab\manus-web\node_modules\.pnpm\next@15.2.2_react-dom@19.1.0_react@19.1.0__react@19.1.0\node_modules\next\dist\build\webpack\loaders\css-loader\src\index.js??ruleSet[1].rules[13].oneOf[5].use[1]!D:\code\gitlab\manus-web\node_modules\.pnpm\next@15.2.2_react-dom@19.1.0_react@19.1.0__react@19.1.0\node_modules\next\dist\build\webpack\loaders\postcss-loader\src\index.js??ruleSet[1].rules[13].oneOf[5].use[2]!D:\code\gitlab\manus-web\src\app\chat\chat.module.css|ssr': No serializer registered for CssSyntaxError
<w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> webpack/lib/ModuleBuildError -> CssSyntaxError
Failed to compile.

./src/app/chat/chat.module.css:2:2
Syntax error: Selector ":global(.ant-bubble-start)" is not pure (pure selectors must contain at least one local class or id)

  1 | 
> 2 |  :global(.ant-bubble-start){
    |  ^
  3 | display: block !important;
  4 | }


> Build failed because of webpack errors
Waiting for the debugger to disconnect...
 ELIFECYCLE  Command failed with exit code 1.
PS D:\code\gitlab\manus-web> pnpm add framer-motion@latest --config.strict-peer-deps=false
Debugger attached.
 WARN  deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
 WARN  6 deprecated subdependencies found: @humanwhocodes/config-array@0.13.0, @humanwhocodes/object-schema@2.0.3, @react-hookz/deep-equal@3.0.3, glob@7.2.3, inflight@1.0.6, rimraf@3.0.2
Packages: +3
+++
Progress: resolved 787, reused 740, downloaded 3, added 3, done
 WARN  Issues with peer dependencies found
.
└─┬ ahooks 3.8.4
  └── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.1.0

devDependencies:
- framer-motion 10.18.0
+ framer-motion 12.9.1 already in devDependencies, was not moved to dependencies.

 EPERM  EPERM: operation not permitted, rename 'D:\code\gitlab\manus-web\package.json.3647733404' -> 'D:\code\gitlab\manus-web\package.json'


Waiting for the debugger to disconnect...
PS D:\code\gitlab\manus-web> pnpm add framer-motion@10.18.0 --force
Debugger attached.
 WARN  using --force I sure hope you know what you are doing
 WARN  deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
 WARN  6 deprecated subdependencies found: @humanwhocodes/config-array@0.13.0, @humanwhocodes/object-schema@2.0.3, @react-hookz/deep-equal@3.0.3, glob@7.2.3, inflight@1.0.6, rimraf@3.0.2
Packages: +788
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
Progress: resolved 788, reused 788, downloaded 0, added 788, done
.
├─┬ framer-motion 10.18.0
│ ├── ✕ unmet peer react@^18.0.0: found 19.1.0
│ └── ✕ unmet peer react-dom@^18.0.0: found 19.1.0
└─┬ ahooks 3.8.4
  └── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.1.0

devDependencies:
- framer-motion 12.9.1
+ framer-motion 10.18.0 (12.9.1 is available) already in devDependencies, was not moved to dependencies.

╭ Warning ───────────────────────────────────────────────────────────────────────────────────╮
│                                                                                            │
│   Ignored build scripts: sharp.                                                            │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.   │
│                                                                                            │
╰────────────────────────────────────────────────────────────────────────────────────────────╯

Done in 3m 10.4s using pnpm v10.6.2
Waiting for the debugger to disconnect...
PS D:\code\gitlab\manus-web> pnpm dev  
Debugger attached.

> langmanus-web@0.1.0 dev D:\code\gitlab\manus-web

相关文章:

  • JMeter添加HTTP请求默认值元件的作用详解
  • PicoVR眼镜在XR融合现实显示模式下无法显示粒子问题
  • 欧拉计划 Project Euler56(幂的数字和)题解
  • pnpm monoreop 打包时 node_modules 内部包 typescript 不能推导出类型报错
  • firewalld 详解
  • 制作一款打飞机游戏24:键盘输入
  • OpenAI最新的4o图像生成模型 gpt-image-1 深度解析:API KEY 获取、开发代码示例
  • 待办事项日历组件实现
  • JAVA设计模式——(七)代理模式
  • 深度探索多模态数据:从声音到图像的奇妙世界
  • C++:继承机制详解
  • 「Java EE开发指南」如何使用MyEclipse的可视化JSF编辑器设计JSP?(一)
  • 【C++基础知识】C++ 模板元编程(Template Metaprogramming, TMP)技术详解
  • 欧拉安装宝塔等,报错Errors during downloading metadata for repository ‘OS‘
  • kaggle配置
  • 基于物联网的智能家居安全防护系统设计
  • WebUI可视化:第5章:WebUI高级功能开发
  • react 常用钩子 hooks 总结
  • WordPress AI 原创文章自动生成插件 24小时全自动生成SEO原创文章 | 多语言支持 | 智能配图与排版
  • Docker安装(Ubuntu22版)
  • 张家界乒乓球公开赛设干部职级门槛引关注,回应:仅限嘉宾组
  • 兵韬志略|美菲“肩并肩”军演超越传统范畴,凸显防务合作重大转型
  • 新城市志|中国消费第一城,迎来“补贴力度最大”购物节
  • 白酒瓶“神似”北京第一高楼被判侵权,法院一审判赔45万并停售
  • 弘扬 “上海精神”,上合组织政党论坛聚焦政党责任与使命
  • 交警不在就闯红灯?上海公安用科技手段查处非机动车违法