The "npm ERR! code ETIMEDOUT
" only happens when using Node V20
:
# node --versionv20.11.1# npm --version10.5.0# npm init vuenpm ERR! code ETIMEDOUTnpm ERR! errno ETIMEDOUTnpm ERR! network request to https://registry.npmjs.org/create-vue failed, reason: 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 thenpm ERR! network 'proxy' config is set properly. See: 'npm help config'npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-22T04_22_21_396Z-debug-0.log
But it is working with Node V18:
# node --versionv18.19.1# npm --version10.2.5# npm init vueNeed to install the following packages:create-vue@3.10.2Ok to proceed? (y) Vue.js - The Progressive JavaScript Framework✔ Project name: … vue-project✔ Add TypeScript? … No / Yes..
The above testing is in the same network environment.
What configuration is required for making the Node V20
to work with npm init vue
?