npm/yarn bugfix
FIXME: npm i version +1 problem
problem and background
Here: is a list of electron packages can install.
After you specify the electron_mirror=https://npm.taobao.org/mirrors/electron/
in the ~/.npmrc
or via npm config set ...
, the installation of electron would auto point to the taobao mirror.
➜ mark_keeps_learning git:(master) ✗ cat ~/.npmrc
#registry=http://npm.tuna.tsinghua.edu.cn/registry
electron_mirror=https://npm.taobao.org/mirrors/electron/
However, what happened is that the installation would be one version exceeds the max version if you do not specify the specified version.
For example, if you specify the electron version to be electron: "^13.0.0"
, then the npm would scan the electron_mirror, and find the final one is 13.6.6
while try to install 13.6.7
, so that a not-found error spawns.
How would it be? And how to solve this problem.
My current solution: specify the detailed version
Specify the version available such as electron: "13.6.6"
and I can use npm to install it correctly.
However, there could be a deeper problem about my npm
and a more reasonable approach to solving out this problem.