cancel
Showing results for 
Search instead for 
Did you mean: 

npm registry issues

pacosta
Established Member

npm registry issues

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

1 REPLY 1
nickH
Occasional Contributor

Re: npm registry issues

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.  

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist