Notes on JupyterLab Build

@saulshanabrook , @ [Kirill888]
My situation is quite similar to kirill888: I am from the 4th category, and we need to make some simple (but necessary) modifications to the jupyterlab (to disable certain feature), and released the modified version to be used by folks in my company. I am also not a javascript person, so npm/yarn/webpack/jlpm/react are all new to me.

Reproducbility is important to me, as I need to put it in CICD build behind corporate firewall/proxy. The build cannot use registry.yarnpkg.com directly, and have to access internal artifactory proxy channel to the yarnpkg.com. This is where I got stuck, and have been looking for help [ Here ] (Source build of jupyterlab 2.2.x failed with settingregistry.ts:221:11 - error TS2722: Cannot invoke an object which is possibly 'undefined' (validate object))

Basically, the problem I think is boiled down to this:

  1. The build works if I use the 2.2.x jupyterlab source, and the yarn.lock file, accessing registry.yarnpkg.com
  2. Build failed when I remove the yarn.lock. I can see yarn.lock has been regenerated accessing the artifactory channel, and compilation seems to work OK, except failing in comping one typescript module.
  3. The failure is likelyy to be related to having different packages/ode modules that I used (different from the released yarn.lock). However, there does not seem to be a way to: use the same versions in yarn.lock, but use a different registry.

Just curious if you have run into similar issue, and any solution? Thanks very much in advance!

BTW, I did run through a simple react tutorial using artifactory channel and my ~/.yarnrc to install the node modules, so I have some confidence that my npm/yarn settings are reasonable.