Closed raulotaolea closed 3 years ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
Hey, if you look at the readme generated for the extension, you have the development installation procedure described see that section.
From your description, you are missing the python package installation and the activation of the server extension.
You can also have a look at the example.
thanks @fcollonval ! I am so used to the fact that in the prebuilt extensions you don't have to manually activate the extension, that I have taken it for granted.
One more question, is it necessary to do thepip install -e
? I thought that with jupyter labextension develop
was not necessary.
For a server extension, there are two parts: Typescript files for the frontend and Python for the backend (the server). You need pip install -e
to install the server extension in dev mode. But the pip install logic will copy the frontend files. What you probably would like is to have the folder symlinked to your dev folder. This is what jupyter labextension develop
does (you can look at the share/jupyter/labextensions
content to see the difference); cf. documentation.
oh, yes, what I wanted to say is that jupyter labextension develop
calls internally to pip install -e
and then creates the symlink.
Indeed I checked the code, you are correct pip install -e
is called if the python package is not found when running jupyter labextension develop
. I was not aware of that - thanks for pointing it to me.
I close this as answered. Regarding the call of pip install -e
by jupyter labextension develop
, it is best to ask the user to do first pip install -e
as jupyter labextension develop
will not work on Windows and because it is good to not hide too much what is going on.
Description
When I create a new extension with a server extension using typescript based cookiecutter in a new python environment, the example doesn't work. I don't know if I should do something in addition to build and install it.
Reproduce
I create a new python env:
then I create a new extension using typescript cookiecutter:
with the following info:
Then I build the extension:
and install it locally for development:
And finally I start jupyterlab:
When a new tab is created in the browser with the lab, I see the following error in the browser's console:
and this one in the server console:
Is this something wrong in the example? or I am not installing the server extension correctly?
Expected behavior
I was expecting the server extension being installed after doing:
and returning:
Context