yunabe / tslab

Interactive JavaScript and TypeScript programming with Jupyter
Apache License 2.0
740 stars 45 forks source link

Project-level installations of tslab have trouble finding imports #48

Open RA80533 opened 3 years ago

RA80533 commented 3 years ago

I installed the TypeScript kernel via tslab install --binary --sys-prefix. The kernel is able to run and execute TypeScript; however, it seems to have trouble finding imports.

$ npm install --save-dev tslab @types/node
[…]
$ ./node_modules/tslab/bin/tslab install --binary "./node_modules/tslab/bin/tslab" --sys-prefix
Running python3 /[…]/node_modules/tslab/python/install.py --tslab=./node_modules/tslab/bin/tslab --sys-prefix
Installing TypeScript kernel spec
Installing JavaScript kernel spec

While the local installation of tslab is not directly available in my global PATH, conferring it via the --binary flag certainly works for executing TypeScript. Would the issue be related to the binary not being included in my PATH even though the binary is configured correctly?

yunabe commented 3 years ago

Could you share the result of jupyter kernelspec list after tslab install? If it shows tslab and jslab entry, could you share the kernel.json in the kernels config directories?

The content should be something like:

{"argv": ["/home/yunabe/src/tslab/bin/tslab", "kernel", "--config-path={connection_file}"], "display_name": "TypeScript", "language": "typescript"}