IQSS / dataverse-frontend

An upcoming and modernized UI for Dataverse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem installing Design System package from npm

ekraffmiller opened this issue · comments

I'm trying to install the design system package from https://www.npmjs.com/package/@iqss/dataverse-design-system to use in the demo repository. I have .npmrc defined as

legacy-peer-deps=true

# design-system registry
//registry.npmjs.org/:_authToken=<github token>
@iqss:registry=https://registry.npmjs.org/

# js-dataverse registry
//npm.pkg.github.com/:_authToken=<github token>
@iqss:registry=https://npm.pkg.github.com/

When I install with just the package name, it's not found, because it's looking for it in github

 npm install @iqss/dataverse-design-system
npm ERR! code E404
npm ERR! 404 Not Found - GET https://npm.pkg.github.com/@iqss%2fdataverse-design-system - npm package "dataverse-design-system" does not exist under owner "iqss"
npm ERR! 404 
npm ERR! 404  '@iqss/dataverse-design-system@*' is not in this registry.
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

When I try to install using the full location of the package, I have a problem reading the tar file

npm install https://www.npmjs.com/package/@iqss/dataverse-design-system/v/1.0.0 
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID invalid base256 encoding
.
.
.
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_ENTRY_INVALID checksum failure
npm WARN tar TAR_BAD_ARCHIVE: Unrecognized archive format
npm ERR! code TAR_BAD_ARCHIVE
npm ERR! TAR_BAD_ARCHIVE: Unrecognized archive format

This is the demo repository where I'm trying to install: https://github.com/ekraffmiller/js-dataverse-vite-demo

This was caused by the .npmrc file needing to refer to two different registries. It will be fixed when the new js-dataverse is published in npm: IQSS/dataverse-client-javascript#113. Until then, we can work around by modifying the .npmrc, so closing this ticket.