Skip to content

Any way to set tsconfig.json or other properties? #63

@yatharth

Description

@yatharth

Steps to reproduce

  1. Start Jupyter Lab in /Users/yatharth/projectDir/
  2. Inside Jupyter Lab, create Typescript or Javascript notebook inside ``/Users/yatharth/projectDir/otherFolder`
  3. Inside notebook, try to do import myFile as '../myFolder/myFile'

Expected Result

The import works.

Actual Result

There’s an error.

3:33 - File '/Users/yatharth/projectDir/myFolder/myFile.ts' is not under 'rootDir' '/Users/yatharth/projectDir/myFolder'

Implications

Can you really not import modules outside the current notebook’s directory? This seems surprising.

Potential solutions

It seems like the rootDir Typescript uses is set to the notebook’s directory. Maybe it would be better set to the initial directory that Jupyter Lab was started in or is serving from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions