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

readme vs README filename cross platform issues #24

Closed
oliversturm opened this issue Nov 22, 2017 · 6 comments
Closed

readme vs README filename cross platform issues #24

oliversturm opened this issue Nov 22, 2017 · 6 comments
Assignees
Labels
Milestone

Comments

@oliversturm
Copy link

The extension doesn't seem to work at all for me. For instance, I receive this error message for bluebird (same for others):

Unable to open 'Preview bluebird': cannot open npm-data:/bluebird. Detail: Missing registry response data.

I can't think of anything special about the project I'm working in. VS Code version is 1.18.0. Any ideas why this would occur?

@bengreenier bengreenier self-assigned this Nov 26, 2017
@bengreenier
Copy link
Owner

Hey @oliversturm! oh no! 1.18.0 introduces some changes to workspaces, and it's possible that's in play (though to be honest, that's not what this failure looks like). That error occurs when the module can't find information about the latest version from npm (see here).

I'm shipping an update that is tested against 1.18.0 (and it's new workspace features) later today, so my advice is let's hold off further investigation until that lands, and if this is still a problem at that point we can dive deeper!

Thanks for taking the time to let me know something is up! hopefully we can get it sorted asap 😸 ⌚️

@bengreenier
Copy link
Owner

bengreenier commented Nov 26, 2017

@oliversturm - that update is live, can you try updating and let me know if that fixed the issue?

If not i'm curious if:

  1. you have internet connectivity on the machine you're testing on
  2. you have a workspace open (a collection of multiple folders)
  3. you have a folder open (a single directory, File -> Open Folder)
  4. you have bluebird locally under <anyFolderOpenInWorkspace>\node_modules\bluebird

Thanks for again for helping me work through this potential issue! 🥇

@oliversturm
Copy link
Author

oliversturm commented Nov 27, 2017

Thanks for your response. After the update, the version showing in VS Code is now v2.1.0, but the problem persists - I still see the same error message for bluebird and seemless-immutable. I have found one more detail: when I try to see the readme for @google-cloud/datastore, I see a different error "cannot open node-readme-npm-data:/%40google-cloud/datastore. Detail: Invalid statusCode 404."

(I checked to be sure, and both seamless-immutable and @google-cloud/datastore include a README.md that I can open by finding it in the Explorer panel.)

To answer your questions:

  1. Yes, I have an internet connection. the machine is the same I'm writing this comment on right now.
  2. I have not opened a workspace
  3. I started code using code . in my project working directory. I would assume that results in the same state as File -> Open Folder.
  4. bluebird and the other packages I was trying are local in node_modules\<package> right there in the project folder.

@oliversturm
Copy link
Author

Okay, it seems I found the problem. In three places in this part of extension.ts you refer to a file readme.md. That's not the name of the readme files - they are called README.md. I'm on Linux, this makes an important difference.

I changed the names to README.md and I was able to bring up the bluebird readme correctly.

@bengreenier
Copy link
Owner

bengreenier commented Nov 27, 2017

ah, right. I hadn't had a chance to test this on anything other than windows - that makes sense. I'll work on a fix sometime this week (or I'd love to accept a PR that makes this lookup work cross platform, if you have time to work on one).

As for the @google-cloud/datastore one, i've not tested that format, it's very possible that some of the path handling doesn't deal with that appropriately. I've added #25 to take a look at ensuring that all works as expected.

Thanks for following up here - folks that take the time to file and follow through with these things are the reason plugins like this can be successful! 💯

@bengreenier bengreenier changed the title Missing registry response data readme vs README filename cross platform issues Nov 27, 2017
@oliversturm
Copy link
Author

I didn't do loads of detailed testing, but with the change of the readme.md to README.md, the problem seemed to be fixed on my machine. I didn't create a PR because I really didn't change anything else and my Prettier setup messed up your file formatting quite a bit :)

oliversturm added a commit to oliversturm/vscode-node-readme that referenced this issue Nov 28, 2017
@bengreenier bengreenier added this to the v2.2.0 milestone Nov 28, 2017
bengreenier added a commit that referenced this issue Nov 30, 2017
* Fix name readme.md -> README.md (fixed #24)

* moduleName tab title handling (fixes #25)

* handle fixed module names in providers

* release notes, bump package version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants