error after installing latest version
Closed this issue · 4 comments
Hi,
I'm getting this:
travisthetechie.write-good-linter] write_good_1.default is not a function: TypeError: write_good_1.default is not a function
at lines.forEach (/Users/dotan.nahum/.vscode/extensions/travisthetechie.write-good-linter-0.0.6/out/src/extension.js:32:47)
at Array.forEach (native)
at doLint (/Users/dotan.nahum/.vscode/extensions/travisthetechie.write-good-linter-0.0.6/out/src/extension.js:31:11)
at context.subscriptions.push.vscode_1.workspace.onDidChangeTextDocument.event (/Users/dotan.nahum/.vscode/extensions/travisthetechie.write-good-linter-0.0.6/out/src/extension.js:13:13)
at e.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:28:57
Any idea why?
Hmm, no, it's not clear why this is happening for you. The stack makes be believe it's happening on https://github.com/TravisTheTechie/vscode-write-good/blob/v0.0.6/src/extension.ts#L44 and not the loop below; which is a bit troubling. I'll take a look.
I think it points to the compiled code. From what I gathered later, requiring write-good
came up with nothing. I'll see if I can get some more information.
This might be the problem:
bd322c9#diff-45327f86d4438556066de133327f4ca2L5
Moving to module system makes it look for .default
as part of the module system after its built, and write-good might not be compiled for that. I removed this locally in my extension and it's back to life.
Upgrading so VSCE would run did break things, have a fix in f7f270d that has been published. If you update it should be working for you. Please reopen if this doesn't fix it for you.