This repository was archived by the owner on Oct 16, 2020. It is now read-only.
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
Malformed package.json files prevent server from responding #436
Open
Description
If a package.json file that's not inside a /node_modules/
tree is malformed (e.g., it has a BOM at the beginning, or a syntax error, or anything else that causes packages.ts
's JSON.parse
of it to fail), then the method handling will fail with the following error:
03:21:21 lsp-proxy | ERROR workspace/xdependencies failed: jsonrpc2: code -32001 message: Expected file:///test/rules/no-implicit-dependencies/default/bom/package.json to be registered in PackageManager {"error":"jsonrpc2: code -32001 message: Expected file:///test/rules/no-implicit-dependencies/default/bom/package.json to be registered in PackageManager","id":1,"method":"workspace/xdependencies","mode":"typescript_bg","repo":"github.com/palantir/tslint","rev":"235561e411c58ecbd4d96844fae28e998f0ccbda","session":""}
Note that this is for the workspace/xdependencies method, but I suspect it would occur for workspace/references too.
(That is in the palantir/tslint repo, which has several malformed package.json files.)