This part of the answer refers to GPT, GPT_Pro better to solve the problem
This situation is very likely to be the npm source problem, because your colleague's side is working normally, and you are wrong. Try it out with different npm sources, which is also a common solution.
The specific steps are as follows:
-
View npm sources currently in use: You can use
npm config get registry
to view npm sources currently in use.
-
Switch to other npm sources: You can use
npm config set registry
to switch to other npm sources, which you can substitute yourself.
-
and use
npm cache clean --force
to clear the cache before installing the package.
-
Install the package again: then use the
npm i
command to install the package.
If the above steps do not solve the problem, you can try using the cnpm command to install the package. The cnpm command is based on npm. The only difference is that cnpm uses the domestic npm source by default, so using cnpm will have a faster download speed. The specific method is also very simple, you just need to replace npm with cnpm, for example
npm install xxx
with
cnpm install xxx
.
If the answer is helpful, please accept it.