Description
If I try to build the latest master of jupyter-fs:
git clone git@github.com:jpmorganchase/jupyter-fs.git
cd jupyter-fs
make js
I get the following error on the tsc
(ie typescript compilation) step:
$ tsc
../node_modules/@jupyterlab/observables/lib/modeldb.d.ts:227:9 - error TS2416: Property 'changed' in type 'ObservableValue' is not assignable to the same property in base type 'IObservableValue'.
Type 'ISignal<this, IChangedArgs>' is not assignable to type 'ISignal<IObservableValue, IChangedArgs>'.
Type 'this' is not assignable to type 'IObservableValue'.
Type 'ObservableValue' is not assignable to type 'IObservableValue'.
The types returned by 'get()' are incompatible between these types.
Type 'JSONValue' is not assignable to type 'PartialJSONValue'.
Type 'JSONObject' is not assignable to type 'PartialJSONValue'.
Type 'JSONObject' is not assignable to type 'string'.
227 get changed(): ISignal<this, ObservableValue.IChangedArgs>;
~~~~~~~
../node_modules/@jupyterlab/observables/lib/modeldb.d.ts:231:5 - error TS2416: Property 'get' in type 'ObservableValue' is not assignable to the same property in base type 'IObservableValue'.
Type '() => JSONValue' is not assignable to type '() => PartialJSONValue'.
231 get(): JSONValue;
~~~
Found 2 errors.
This is definitely being caused by the latest release of @lumino/coreutils
, since if I add a resolution to the previous coreutils
to my package.json
:
"resolutions": {
"@lumino/coreutils": "1.5.0"
}
the build error is fixed.
I beleive the underlying cause is the redefintion of JSONObject
that was part of the 1.5.1 release.
@lumino/coreutils@1.5.0:
lumino/packages/coreutils/src/json.ts
Lines 26 to 30 in 00ae441
@lumino/coreutils@1.5.1:
lumino/packages/coreutils/src/json.ts
Lines 26 to 30 in 36debf6
Because this was a patch release of coretuils (1.5.0 => 1.5.1), you'll likely only see the bug if you delete your yarn.lock
(or if start from a fresh build that never had one).