• notice
  • Congratulations on the launch of the Sought Tech site

ERROR Error: Cannot find module 'vue-loader-v16/package.json' when building

It is normal when npm run build is performed locally, but when it is used on the server to use jenkins, an error is reported: ERROR Error: Cannot find module 'vue-loader-v16/package.json'. But actually, my jenkins releases were normal just a week ago. Execute npm debugging in the server docker window, and the error message is as follows:

npm ERR! request to https://registry.npm.taobao.org/npm failed, reason: getaddrinfo EAI_AGAIN registry.npm.taobao.org

    Through comparison, it is found that this domain name cannot be resolved in the docker environment, but it is normal under the host machine. So by pinging the corresponding domain name registry.npm.taobao.org under the host machine, find the target IP address and write these resolutions to the /etc/hosts file in the docker window, but when using npm run, it is found that there are other The domain names involved, and finally added these three domain names, and then made some updates to npm and successfully resolved it.

#Add the following to /etc/hosts
101.72.205.232 registry.npm.taobao.org
42.48.120.138 registry.npmmirror.com
220.181.158.241 cdn.npmmirror.com

# update npm
npm install npm@latest -g.


Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+