Besides dependency and devDependency in package.json, there’s also peerDependency. Let’s resolve a real-world error to understand how it works. Error Message npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: a@0.0.1-beta npm ERR! Found: ssh2@1.15.0 npm ERR! node_modules/ssh2 npm ERR! ssh2@"1.15.0" from the root project npm ERR! ssh2@"^1.12.0" from ssh2-sftp-client@9.1.0 npm ERR! node_modules/ssh2-sftp-client npm ERR! ssh2-sftp-client@"^9.1.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer ssh2@"1.16.0" from a@0.0.1-beta npm ERR! packages/a npm ERR! a@0.0.1-beta npm ERR! node_modules/a npm ERR! workspace packages/a from the root project npm ERR! npm ERR! Conflicting peer dependency: ssh2@1.16.0 npm ERR! node_modules/ssh2 npm ERR! peer ssh2@"1.16.0" from a@0.0.1-beta npm ERR! packages/a npm ERR! a@0.0.1-beta npm ERR! node_modules/a npm ERR! workspace packages/a from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! /Users/alanhe/.npm/_logs/2025-01-02T02_53_13_141Z-eresolve-report.txt npm ERR! A complete log of this run can be found in: npm ERR! /Users/alanhe/.npm/_logs/2025-01-02T02_53_13_141Z-debug-0.log Error Analysis The project’s direct dependency pins ssh2 at version 1.15.0, while package a lists ssh2@1.16.0 in its peerDependency field.
Jan 2, 2025
This year, I updated some software and hardware. There are not many items, but all are practical tools. Let’s take a look. Hex Key Set Purchased from JD, price: 45CNY. I previously bought various models of Xiaomi electric screwdrivers, but I still needed hex keys. This time, I got a hex key set that includes multiple sizes, which is very practical. Combined with the Xiaomi electric screwdriver, I’m now prepared for all types of screws.
Jan 1, 2025
Click-to-component is a React component that enables one-click navigation to source code, significantly improving development efficiency. Here I attempt to read the source code and document key points. Source Code Structure The project uses pnpm as the package management tool, with pnpm workspace managing multiple packages.
Dec 31, 2024
We planned to move my mother‑in‑law’s hukou to Beijing. The procedures are numerous and the outcome is uncertain — many cases are “queued indefinitely”. Here’s the process; I’ll update if there’s progress.
Dec 28, 2024
The better AI code assistance tools are Cursor/GitHub Copilot/JB’s AI Assistant. Due to cost considerations, I only subscribe to ChatGPT, but I still need an AI tool for JetBrains IDEs. I decided to use my student identity to get GitHub education verification for free Copilot access.
Dec 27, 2024
In actual development, finding code often involves copying styles or text from the browser and searching in the IDE. Can I directly click any element on the page and jump to open the corresponding code file in the IDE? click-to-component is such a tool.
Dec 26, 2024
Quark Cloud Drive cannot be directly integrated into Infuse for viewing. To make movie watching more convenient, here we combine NAS+Alist to solve cloud drive experience issues. Alist Add Quark Cloud Drive under alist. alist service supports providing WebDAV externally, enabled by default. The address is http[s]://domain:port/dav/, with the same username and password as the web interface. For example, mine is https://alist.1991421.cn/dav. NAS-CloudSync Add WebDav service, select the folder to sync. After the task starts, cloud drive resources will gradually download to the NAS.
Dec 25, 2024
While using click-to-component recently, I discovered it didn’t support JB IDE integration, so I spent some time implementing support. Here, I’ll mark down JB’s URL Scheme support situation. JB IDE itself doesn’t provide direct URL Scheme support. After research, I found the following 2 solutions.
Dec 25, 2024
To quickly access my network proxy information and public IP details, I created a workflow for convenience. Screenshots Download Link Implementation The workflow relies on the following commands to retrieve network information:
Dec 21, 2024
ChatGPT now supports chatting over WhatsApp. I hadn’t registered WhatsApp before, so I used this as an opportunity to try it. Prerequisites I have a Giffgaff UK SIM card in my phone. I’ll try registering with that phone number.
Dec 19, 2024