You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside Jupyter Lab, create Typescript or Javascript notebook inside ``/Users/yatharth/projectDir/otherFolder`
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.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
/Users/yatharth/projectDir/
import myFile as '../myFolder/myFile'
Expected Result
The import works.
Actual Result
There’s an error.
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.The text was updated successfully, but these errors were encountered: