Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving the Error when trying to run my first program #61

Open
JacobJWalker opened this issue Oct 11, 2021 · 2 comments
Open

Receiving the Error when trying to run my first program #61

JacobJWalker opened this issue Oct 11, 2021 · 2 comments

Comments

@JacobJWalker
Copy link

JacobJWalker commented Oct 11, 2021

I just installed TSLab, in Anaconda, and everything was looking good, but when I tried to run the first program:

import * as tslab from 'tslab';

console.log('Hello, tslab!')
console.log('Versions:', tslab.versions)

I received the following error:

Cannot find name 'console'. Do you need to change your target library? Try changing the lib compiler option to include 'dom'.

I tried finding a solution on the Internet, but they talk about changing the tsconfig.json file. But I can't seem to find where that file is. Any help would be greatly appreciated. I love Jupyter, and really need to start to learn TypeScript (and JavaScript)

@JacobJWalker JacobJWalker changed the title Receiving the Error when Receiving the Error when trying to run my first program Oct 11, 2021
@laoshaw
Copy link

laoshaw commented Jan 28, 2022

same problem here, can not use tslab due to this is. console.log() is really in node.js and not just the browser(dom), can this be supported? if I need supply a tsconfig.js somehow that's fine too.

@laoshaw
Copy link

laoshaw commented Jan 28, 2022

I started tslab inside a dir with tsconfig.js and now it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants