[Download dependency error] Error npm ERR code ENOTFOUND reported because it was gone in one afternoon
Table of contents
Well, first of all I want to announce something: “I’m stupid b” I feel really stupid this time
I really turned me off today, just because the front-end dependencies of that project couldn’t be downloaded for a long time, and it disappeared in one afternoon, boil it!
Because there is an old project that needs to be changed today, so I handed the old project to me, and then the first thing is to start the project, and then to start the project, first go to the company’s gitlab and use git to switch the front and back ends. Pull these down, and then start them in the front-end and back-end applications. To start, you have to download their dependencies first. Then I have problems all the time, and I can’t download them all the time. The error reported is a network error, that is The picture in the module where the problem is located below is shown in the picture, but I tried to change multiple networks. First, I tried both wifi in the company, and then I used my mobile phone to open a hotspot to the computer. I thought that this was not a mistake, and then I blew up my mentality
because I tried yarn install, npm install, and cnpm install in the middle of using vue, but the errors reported by everyone are similar to this. , almost all network errors
problem lies in
npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND npm ERR! network request to http://registry.cnpmjs.org/webpack failed, reason: getaddrinfo ENOTFOUND proxy-szn npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config'
Well, in the end , the problem was solved by a network cable , because before, whether it was the company’s wifi or the mobile phone’s hotspot, it was a wireless network. Finally, I found a network cable jack on the company’s floor, and then plugged the computer into the wired network, and then There is no problem in downloading dependencies again, goose goose goose goose goose goose goose goose goose goose goose! ! ! Boil! ! !
Because I couldn’t download the dependencies during the process, I was also very anxious. Then I asked my mentors, colleagues, and many people to come and have a look. They analyzed several reasons:
1. The company needs to install encryption software on its own computer, and then many files, downloaded and your own document files (as long as you edit them, they will be encrypted) and then when you rely on such operations as downloads, it may be because the amount of downloads is relatively large and the computer is relatively old (not yet After graduation, the internship salary is not high, so I haven’t changed the computer yet) The encryption software may go back to scan a lot of files (which may cause the network) (although this does not explain the reason why plugging in the wired network solves the problem)
2 , It is also possible that the computer is not working, change the computer! ! ! (I also think, but need money)
3. My wireless network driver is broken (try to update but it doesn’t work)