Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web UI not listing packages because of 'time' property unavailability in package.json in storage dir #758

Closed
kumarvi opened this issue Jun 14, 2018 · 8 comments

Comments

@kumarvi
Copy link

kumarvi commented Jun 14, 2018

Describe the bug

We're trying to migrate from sinopia to verdaccio for our internal npm registry, and noticed that the internal packages that were published using our existing setup (using sinopia) aren't showing up in the Web UI with the latest verdaccio (version: 3.1.2), even though we're able to install them. This is happening because of the some of the packages that were published earlier seem to be missing the time property in the package.json

To Reproduce

Ensure a module is already published once to verdaccio. Remove the time member from the package.json inside the storage directory. Then try to load the Web UI home page.

Results:

  • The published package doesn't show up in the Web UI
  • The below exception shows up in the verdaccio.log during server start-up

TypeError: Cannot read property '2.1.0' of undefined
 at ../node_modules-v8/lib/node_modules/verdaccio/build/lib/storage.js:389:37
 at storage.readPackage (../node_modules-v8/lib/node_modules/verdaccio/build/lib/local-storage.js:616:7)
 at ../node_modules-v8/lib/node_modules/verdaccio/node_modules/@verdaccio/local-storage/lib/local-fs.js:167:9
 at <anonymous>

Additional context
There has to be a isNil check for the time property in https://github.com/verdaccio/verdaccio/blob/master/src/lib/storage.js#L374, similar to the fix done in e977d50 to support backward compatibility.

@juanpicado juanpicado added this to the 3.x.x milestone Jun 14, 2018
@juanpicado juanpicado added this to To do in Roadmap via automation Jun 14, 2018
@juanpicado juanpicado self-assigned this Jun 14, 2018
Roadmap automation moved this from To do to Done Jun 15, 2018
juanpicado added a commit that referenced this issue Jun 15, 2018
fix: normalize package was broken #758
@juanpicado
Copy link
Member

Please try with verdaccio@3.2.0

@kumarvi
Copy link
Author

kumarvi commented Jun 15, 2018

Verified, thank you! @juanpicado

One related minor UI (alignment) issue in the home page I noticed when there are packages with/without the time details in their package.json, attaching the screenshot below:

image

@juanpicado
Copy link
Member

@kumarvi I don't get it. License is missing?

@kumarvi
Copy link
Author

kumarvi commented Jun 15, 2018

The license div is not right aligned, for the older packages, because of the missing time info div on the left side.

@juanpicado
Copy link
Member

Ohh !! I must be blind. I'll create a ticket. Thanks 👍

@ayusharma
Copy link
Member

@kumarvi @juanpicado I am creating a separate issue for this. 🥇

@ayusharma
Copy link
Member

@kumarvi I confirm the License alignment issue. It will be solved soon. Thanks 😀

Ref #761

@lock
Copy link

lock bot commented Jan 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the outdated label Jan 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Roadmap
  
Done
Development

No branches or pull requests

3 participants