ChristianKohler / PathIntellisense

Visual Studio Code plugin that autocompletes filenames
https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense
MIT License
424 stars 45 forks source link

Error at startup #99

Closed Zerogiven closed 2 years ago

Zerogiven commented 6 years ago
```json 
{
    "activationTimes": {
        "startup": true,
        "codeLoadingTime": 9,
        "activateCallTime": 2,
        "activateResolvedTime": 0,
        "activationEvent": "*"
    },
    "runtimeErrors": [
        {
            "name": "SyntaxError",
            "message": "Unexpected token / in JSON at position 25"
        }
    ]
}
Zerogiven commented 6 years ago

Some more info from the dev tools console

/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:4056 SyntaxError: Unexpected token / in JSON at position 25 at JSON.parse () at /home/csoellinger/.vscode/extensions/christian-kohler.path-intellisense-1.4.2/out/src/utils/config.js:20:25 at Object.g [as _notify] (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:67:449) at Object.enter (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:70:778) at n.Class.derive._oncancel._run (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:72:573) at n.Class.derive._oncancel._completed (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:72:14) at e.resolveOk (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:355:384) at e._receiveOneMessage (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:356:894) at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:356:206 at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:358:204 e.$onExtensionRuntimeError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:4056


/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] WARNING: Promise with no error callback:2


/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host]% Objecterror: nullexception: Objectproto: Objectid: 2promise: Object_creator: null_errorId: 2_isException: true_listeners: null_nextState: null_state: Object_value: Objectproto: Objectproto: Objectproto: Object


/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:249 [Extension Host] SyntaxError: Unexpected token / in JSON at position 25 at JSON.parse () at /home/csoellinger/.vscode/extensions/christian-kohler.path-intellisense-1.4.2/out/src/utils/config.js:20:25 at Object.g [as _notify] (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:67:449) at Object.enter (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:70:778) at n.Class.derive._oncancel._run (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:72:573) at n.Class.derive._oncancel._completed (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:72:14) at e.resolveOk (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:355:384) at e._receiveOneMessage (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:356:894) at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:356:206 at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:358:204

tonyhallett commented 6 years ago

This is probably due to comments in your tsconfig. tsconfig -init produces tsconfig.json with commented out options. Comments in json are an extension to the JSON specification and so the extension code will throw when JSON.parse is called on the contents of your tsconfig.json.

tonyhallett commented 6 years ago

This has been addressed by the pull request https://github.com/ChristianKohler/PathIntellisense/pull/82. https://github.com/ChristianKohler/PathIntellisense/pull/82/commits/133f1c6692d64b096eeb10b396887b9015095b15