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

vsce package on marketplace different than when building a package #583

Closed
juli1 opened this issue Jun 16, 2021 · 2 comments
Closed

vsce package on marketplace different than when building a package #583

juli1 opened this issue Jun 16, 2021 · 2 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@juli1
Copy link

juli1 commented Jun 16, 2021

Hello,

When I build my package using vsce package, it produces a file I can use and install manually in vscode. Everything works.

When I use vsce publish, it uploads a file on the marketplace that has a contents different than the package I have with vsce package. In particular, the extension.js file (the main entrypoint) is replaced into a file called main.js. As a result, the main entrypoint is not found when trying to start the extension. So the extension works when built locally (using vsce package) but the extension on the marketplace does not work.

Code can be found here: https://github.com/codeinspectorio/vscode-plugin

The package on the marketplace (not working) can be found here: https://marketplace.visualstudio.com/items?itemName=code-inspector.code-inspector-vscode-plugin&ssr=false#overview

Not sure if this is a problem related to vsce, my configuration or the marketplace itself. If not the right place and you know where is the right place, please let me know.

Thanks!

@joaomoreno joaomoreno self-assigned this Jun 18, 2021
@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Jun 18, 2021
@joaomoreno
Copy link
Member

In particular, the extension.js file (the main entrypoint) is replaced into a file called main.js.

Can you show me this? I don't see that when I download the VSIX and look at it myself:

image

@juli1
Copy link
Author

juli1 commented Jun 18, 2021

Hi @joaomoreno, sorry for keeping this ticket opened, I found the issue and the new package is fixed.

What happened is the following: if I sent a package to the marketplace, the content with the package.js was replaced with a main.js. To see what happened, I unzipped the package, renamed main.js to package.js, rezip the file and load it in VS Code manually. It happened that the plugin was not loading because of two different versions of graphql in the dependencies (an issue found here by others when using apollo-client).

To fix the issue, I removed my dependency on apollo-client (used the one from axios) and everything is now working.

I suspect that during the verification process, the content of the code is analyzed, maybe repackaged, and the tool failed and just produced an artifact (main.js). Of course, that is just an assumption since I have no visibility on the verification process on the VS Code marketplace.

I am closing this ticket because (1) it seems related to the marketplace website and not directly to vsce and (2) I no longer have this problem. Sorry for not having closed it earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants