Flow-for-vscode: [BUG] Activating extension `flowtype.flow-for-vscode` failed

Created on 28 Jul 2017  路  5Comments  路  Source: flowtype/flow-for-vscode

Summary

Extension does not work at all. Spent the last 2++ hours searching for solutions and trying everything but nothing worked. Please see the error and screenshot below and let me know if you need additional information. Thanks.

VS Code Version

  • VSCode Version: Code - Insiders 1.15.0-insider (0e7546c978fa1b62dbf36f07a77d1b9a4241d6f7, 2017-07-28T11:13:40.108Z)
  • OS Version: Darwin x64 16.7.0
  • Flow extension version: 0.7.1

Error Stack

[Extension Host] Here is the error stack:  Error: [flowtype.flow-for-vscode]: Proposed API is only available when running out of dev or with the following command line switch: --enable-proposed-api flowtype.flow-for-vscode
    at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:23:403983
    at Object.get credentials [as credentials] (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:23:416364)
    at _interopRequireWildcard (/Users/peter/.vscode-insiders/extensions/flowtype.flow-for-vscode-0.7.1/build/flowMain.js:30:219)
    at Object.<anonymous> (/Users/peter/.vscode-insiders/extensions/flowtype.flow-for-vscode-0.7.1/build/flowMain.js:14:14)
    at Object.<anonymous> (/Users/peter/.vscode-insiders/extensions/flowtype.flow-for-vscode-0.7.1/build/flowMain.js:70:3)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

Screenshot

code - insiders007

Most helpful comment

This is fixed in today's insiders build of VSCode.

All 5 comments

Confirmed here, too.

Version 1.15.0-insider
Commit b67fee36dedecc0b59c14147b8f1a0dad89209b4
Date 2017-07-26T05:10:18.002Z
Shell 1.6.6
Renderer 56.0.2924.87
Node 7.4.0
Architecture x64

So in lib/flowMain.js we have

import * as vscode from 'vscode';

which gets transformed to

var _vscode = require('vscode');
var vscode = _interopRequireWildcard(_vscode);

where _interopRequireWildcard seems to copy every property out of the imported object.

Without really knowing what I'm talking about, maybe this is due to the recent change that
@chrmarti made in https://github.com/Microsoft/vscode/commit/a6a07a74e09333b8dcf7d98846e438e1c4ca96d6 ? I think by adding the credentials getter, which errors when it's called, it breaks the

    import * as vscode from 'vscode';

pattern. And while we could totally migrate away from that pattern, perhaps it was a mistake to break it?

I didn't expect that to be a problem. It looks like that would affect other languages using that helper function too. I'll open an issue for it on our side.

This is fixed in today's insiders build of VSCode.

Awesome! Thanks a ton @chrmarti for the quick fix!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wbinnssmith picture wbinnssmith  路  5Comments

dominictwlee picture dominictwlee  路  5Comments

micmro picture micmro  路  4Comments

thymikee picture thymikee  路  6Comments

jpokrzyk picture jpokrzyk  路  6Comments