By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Node.JS how to fix connect ENETUNREACH on npm on linux


New Coder
i am not using a proxy im just a noob trying to learn how to develop with `create-react-app` locally on my machine(linux)

this is the output of `tracepath registry.npmjs.org`

1?: [LOCALHOST] 0.020ms pmtu 1500
1: 2001:4451:664:1400:caf6:c8ff:fef2:bdcb 2.906ms !N
1: 2001:4451:664:1400:caf6:c8ff:fef2:bdcb 0.995ms !N
Resume: pmtu 1500

i think this proves im not using a proxy.

but i keep getting this error

npm ERR! syscall connect

for anything npm. i dont know what to do.

i have tried..

1. deleting the package.json in my home directory. deleting the
2. package-lock.json in my home directory. deleting the .npm directory
in my home direcory.
3. clearing the cache with the npm config command
4. setting https-proxy from the config to null setting proxy from the
5. config to null setting the registry to https://registry.npmjs.org
6. setting the registry to htpp://registry.npmjs.org uninstalled npm
7. and dependencies then reinstalled unintsalled npm and dependencies then installed nvm and reinstalled node through that

`npm install --verbose` doesnt say any error messages

please somebody help me, i try just about anything shy of reinstalling my os.
Those error lines spewed by npm are pretty damn useless...
Back when I was still working with Linux, first thing I'd have done is run my command under strace, specifying network tracing only, and search in the output for ENETUNREACH. That at least should make clear what it's failing to connect to (which might not be registry.npmjs.org for all we know).
So you could try
strace -o strace.log -e trace=%file <your-npm-command-here> vi strace.log

New Threads

Latest posts

Buy us a coffee!

Top Bottom