简体   繁体   中英

jupyter labextension install of qgrid failed on optional dependency (windows)

When I try jupyter labextension install qgrid it fails, and the core error in the log file is the following:

$ webpack --config webpack.prod.minimize.config.js
[webpack-cli] ModuleNotFoundError: Module not found: Error: Can't resolve 'base/js/dialog'

The context in which this error occurs is so complicated it is kind of funny:

Windows 10 >> Conda environment >> jupyter labextension install >> npm >> node yarn.js run >> webpack

Everything from the conda environment on down is newly installed as of two days ago. (jupyter lab version 3.0.9, node version v14.16.0)

What is particularly interesting about the error is that the only reference to base/js/dialog in the code is this statement from qgrid.widget.js :

try {
  dialog = require('base/js/dialog');
} catch (e) {
  console.warn("Qgrid was unable to load base/js/dialog. " +
               "Full screen button won't be available");
}

Now I don't know how webpack works, but it seems that somehow the optional load is causing a hard failure. I'm looking for any insight on how to tackle this error.

(Additional note: I also tried jupyter lab build just in case that would magically fix things, but it resulted in the same error.)

This is most likely caused by the qgrid not being updated to work with JypyterLab 3. There are several related issues at https://github.com/quantopian/qgrid eg #351 .

Unfortunately this extension doesn't seem to be updated that regularly. If you don't want to stay on J2 then you can have a look at perspective or ipyaggrid . I have used both on JL3.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM