DennisvHest / vscode-npm-browser

Easily search, install and keep track of NPM packages from within Visual Studio Code.
14 stars 5 forks source link

package.json not found, but does exist in workspace #27

Closed sauntimo closed 3 years ago

sauntimo commented 3 years ago

Questions

Specs

Screenshot

Screenshot 2021-02-03 at 09 56 40
DennisvHest commented 3 years ago

@sauntimo, thanks for creating this issue. It is not possible to manually point to a package.json file. The extension should be able to find the package.json in the root of the workspace. The extension basically looks for any package.json files in the workspace that are not in a node_modules folder. Another reason it would be unable to "find" the package.json could be that it had a problem reading the package.json itself, but I doubt that that's the case.

Do you have this problem with this workspace specifically or does it also occur in other workspaces with a package.json? If there is any error that occurs, you should be able to see it in the devtools window when the extension is open. You can do this by pressing CMD+SHIFT+F12 and opening "developer tools" or "webview developer tools" while te extension is open.

image

If there are any errors, i could look into the cause of this problem.

sauntimo commented 3 years ago

Hey @DennisvHest thanks for getting back to me. Having just seen your comment, I reenabled the extension and it's working fine! I note that this morning my VSCode updated to 1.53.0, so I wonder if that fixed something? Anyway, if it misbehaves again, I'll see if I can grab the error and share it with you.

Also, neat idea for a useful extension, I'll enjoy using it! Feel free to close this, btw.

DennisvHest commented 3 years ago

That's good to hear! Thanks!