FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
04-02-2021 04:28 AM
I am hitting a weird problem. When in a snap I try to npm-install a package (in a directory under $SNAP_USER_DATA), I get the following error:
ERR! request to https://registry.npmjs.org/[PACKAGE-NAME-OMITTED] failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org
After some searching this error apparently is typically associated with DNS errors. So I ssh'd to the ctrlX CORE and run a ping command to the Google DNS, which succeeded:
$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=14.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=16.9 ms
[...]
However, when I pinged registry.npmjs.org, I got not responses.
$ ping registry.npmjs.org
PING registry.npmjs.org (104.16.23.35) 56(84) bytes of data.
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
[...]
I ran the same commands in a Debian VM in the same network, and both the pings to Google and the npm registry succeeded. Now, interestingly enough, the DNS part did work, i.e. the ctrlX CORE ping and the VM ping both resolved to the same IP, it is just that the ctrlX CORE ping to the npm registry did not return anyting. I was obviously also able to install the package without issues in the Debian VM.
Any thoughts/clues as to what may be wrong???
Pablo
Solved! Go to Solution.
11-24-2022 11:12 AM - edited 11-24-2022 11:13 AM
Hello,
sorry for the late reply.
The operating system ctrlX CORE is based on is Ubuntu Core. Ubuntu Core is based on snaps and other package managers are not supported (like APT or npm).
If you want to use a npm-package inside of your snap, you have to bring it with your snap (parts) to the ctrlX CORE.