meganrogge / template-string-converter

Autocorrect from quotes to backticks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code OSS cannot activate extension after update to 0.5.4

RB-Lab opened this issue · comments

Hello! First of all, this is really must have extension, thanks for creating it!

After update to version 0.5.4 the extension just stops working. After some couple of times reinstalling extension, I've notice the tab "Runtime Status", and on it it was said "Not yet activated". After quite some more time, I've found the "Log (Extension Host)" sections in logs panel and there was error:

[2021-12-08 12:31:54.295] [exthost] [error] Activating extension meganrogge.template-string-converter failed due to an error:
[2021-12-08 12:31:54.295] [exthost] [error] Error: Cannot find module '/home/user/.vscode-oss/extensions/meganrogge.template-string-converter-0.5.4/out/extension.js'

I went in the extension folder and found that in packge.json it is said: "main": "./out/extension.js". However there is no folder named out. But there is a file, named launch.json and in it there is a string:

"outFiles": ["${workspaceFolder}/dist/web/**/*.js"],

So, I've just copied all contend contend of dir/web into newly created out directory and everything looks to be working now.

I'm not familiar with Code extension publishing process, but it looks like something went wrong somewhere in it. Maybe it is due to my Code version, which is 1.62.0, or maybe it somehow related to the fact that in Arch's Linux Code uses different marketplace: Open VSX Registry.

Hey thanks so much for this report and info. Can you try updating to version 0.5.5? It's working for me in that version.

Emm.. is it available? In my repo it seems that 0.5.4 is the latest version:
image
And here on GitHub it seems to be as well.

also just tried rolling back to 0.5.4 and wasn't seeing the problem you describe there either.

Hm. Yeah, just downloaded 0.5.4 from VisualStudio Marketplace and there out folder is in place. Seem to be OpenVSX problem.

Ahh, damn, it's not even you who published the extension there!
image
Ok. I'll address this issue to open-vsx than.

It looks like the out/ directory gets no longer generated, webpack outputs its results to dist/.

This is the result after packaging with vsce:
image

@meganrogge it looks like the wrong paths are here, or am I missing something?

"main": "./out/extension.js",
"publisher": "meganrogge",
"browser": "./out/extension.js",

I made this web-enabled, which is why there is that browser entry there.

Replace the scripts in the package.json with:

"scripts": {
    "vscode:prepublish": "npm run compile",
    "compile": "tsc -p ./",
    "watch": "tsc -watch -p ./",
    "package-web": "eslint . --ext .ts,.tsx"
  },

it will work