Comments (9)
Was literally about to open up an issue for this problem.
$> jupyter console --kernel=tslab
unknown msg_type: history_request
Jupyter console 6.4.0
TypeScript
In [1]: 1
unexpected error: TypeError: Cannot read properties of undefined (reading 'locals')
at remainingDecls (/Users/tiansivive/.nvm/versions/node/v16.13.1/lib/node_modules/tslab/dist/converter.js:437:36)
at Object.convert (/Users/tiansivive/.nvm/versions/node/v16.13.1/lib/node_modules/tslab/dist/converter.js:313:23)
at Object.execute (/Users/tiansivive/.nvm/versions/node/v16.13.1/lib/node_modules/tslab/dist/executor.js:140:38)
at JupyterHandlerImpl.handleExecuteImpl (/Users/tiansivive/.nvm/versions/node/v16.13.1/lib/node_modules/tslab/dist/jupyter.js:223:38)
at /Users/tiansivive/.nvm/versions/node/v16.13.1/lib/node_modules/tslab/dist/jupyter.js:181:57
at async JupyterHandlerImpl.handleExecute (/Users/tiansivive/.nvm/versions/node/v16.13.1/lib/node_modules/tslab/dist/jupyter.js:181:21)
at async ZmqServer.handleExecute (/Users/tiansivive/.nvm/versions/node/v16.13.1/lib/node_modules/tslab/dist/jupyter.js:379:25)
at async ZmqServer.handleShellMessage (/Users/tiansivive/.nvm/versions/node/v16.13.1/lib/node_modules/tslab/dist/jupyter.js:324:21)
Shutting down kernel
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<ZMQTerminalInteractiveShell.interact() done, defined at /Users/tiansivive/opt/anaconda3/lib/python3.9/site-packages/jupyter_console/ptshell.py:635> exception=KeyError('execution_count')>
Traceback (most recent call last):
File "/Users/tiansivive/opt/anaconda3/lib/python3.9/site-packages/jupyter_console/ptshell.py", line 648, in interact
self.run_cell(code, store_history=True)
File "/Users/tiansivive/opt/anaconda3/lib/python3.9/site-packages/jupyter_console/ptshell.py", line 730, in run_cell
self.handle_execute_reply(msg_id, timeout=0.05)
File "/Users/tiansivive/opt/anaconda3/lib/python3.9/site-packages/jupyter_console/ptshell.py", line 768, in handle_execute_reply
self.execution_count = int(content["execution_count"] + 1)
KeyError: 'execution_count'
from tslab.
Seems like this is only an issue in the latest release.
Uninstalling and installing v1.0.16 via
npm i -g [email protected]
fixes the issue.
Looks like there's been some changes to src/converter.ts
which are causing the issue
from tslab.
I've tracked down the issue to one of these 2 lines:
Lines 588 to 589 in 81289c8
Seems like the srcSF or decsSF are undefined
, so something must be going wrong in the convert
function
Line 340 in 81289c8
from tslab.
Thank you for the report. The TypeScript compiler's watch mechanism changed in v4.9 (tslab: v1.0.18) and I think the change in TypeScript compiler is suspicous although I cannot reproduce the issue on Linux Node.js.
@tiansivive Does this happen from which version of tslab? Do tslab v1.0.17 and v1.0.18 work in your environment?
from tslab.
This happens on v1.0.19. I'll try to uninstall and downgrade and report back. Thanks.
from tslab.
I can confirm that this issue does not happen on v1.0.16 using Node v18.16.0. Thanks for the help! Please close the ticket if appropriate.
from tslab.
@yunabe oh, I didn't realise I skipped those versions. I tried them now and v1.0.17 works but not v1.0.18.
So it does seem like it's the watch mechanism with TS 4.9
For the record, I'm running a MacBook Pro on Monterrey (12.4)
from tslab.
I enabled GitHub Actions to run continuous tests on Windows and MacOS.
I confirmed tests are green in all operating systems with TypeScript 4.6 (https://github.com/yunabe/tslab/actions/runs/4954329573), but tests fail in the main branch with TypeScript 5 (https://github.com/yunabe/tslab/actions/runs/4953911999).
from tslab.
The root cause of the problme was TypeScript changed the file normalization logic in environments with case-insensitive filesystems (e.g. Windows, MacOS). I implemeneted a workaround and released v1.0.21
with TypeScript 5.0.
Could you try v1.0.21
and let me know if it does not work?
Thanks,
yunabe
from tslab.
Related Issues (20)
- Allow user to change how output is printed
- VSCode's intellisense misses variables from blocks that contain "import" statements HOT 11
- tslab can't work fully outside C:\ HOT 1
- Receiving the Error when trying to run my first program HOT 2
- Having issues installing on a Macbook Air M1 HOT 16
- Any way to set tsconfig.json or other properties? HOT 3
- no code completion and cannot import global packages
- tslab in VS Code HOT 2
- Cannot find name 'console'.
- How do I set the lib compiler option?
- Cannot import packages from nodejs. HOT 2
- How to specify node version? HOT 1
- library issues
- Error [ERR_REQUIRE_ESM]: require() of ES Module not supported. HOT 2
- Using tslab as interactive documentation with turborepo #question
- Running notebooks from VSCode HOT 1
- General: future plans for tslab HOT 2
- are there any "magics" in this kernel?
- No BigInt support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tslab.