vegalite 在jupyterlab上运行错误

1、图标一
using VegaLite, VegaDatasets
VegaDatasets.dataset(“population”) |>
@vlplot(
height={step=17},
:bar,
transform=[{filter=“datum.year == 2000”}],
y=“age:o”,
x={“sum(people)”, axis={title=“population”}}
)

运行结果
internal/modules/cjs/loader.js:800
throw err;
^

Error: Cannot find module ‘…/…/deps/node_modules/vega-lite’
Require stack:

  • D:\julia\data\packages\VegaLite\CzoMX\src\rendering\vl2vg.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (D:\julia\data\packages\VegaLite\CzoMX\src\rendering\vl2vg.js:3:12)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions…js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [
    ‘D:\julia\data\packages\VegaLite\CzoMX\src\rendering\vl2vg.js’
    ]
    }
    internal/modules/cjs/loader.js:800
    throw err;
    ^

Error: Cannot find module ‘D:\julia\data\packages\VegaLite\CzoMX\deps\node_modules\vega-cli\bin\vg2svg’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11 {
code: ‘MODULE_NOT_FOUND’,
requireStack: []
}

图表二
using VegaLite, VegaDatasets

VegaDatasets.dataset(“population”) |>
@vlplot(
:bar,
transform=[{filter=“datum.year == 2000”}],
y={“age:o”,sort="-x"},
x={“sum(people)”, axis={title=“population”}}
)

结果:
internal/modules/cjs/loader.js:800
throw err;
^

Error: Cannot find module ‘…/…/deps/node_modules/vega-lite’
Require stack:

  • D:\julia\data\packages\VegaLite\CzoMX\src\rendering\vl2vg.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (D:\julia\data\packages\VegaLite\CzoMX\src\rendering\vl2vg.js:3:12)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions…js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [
    ‘D:\julia\data\packages\VegaLite\CzoMX\src\rendering\vl2vg.js’
    ]
    }
    internal/modules/cjs/loader.js:800
    throw err;
    ^

Error: Cannot find module ‘D:\julia\data\packages\VegaLite\CzoMX\deps\node_modules\vega-cli\bin\vg2svg’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11 {
code: ‘MODULE_NOT_FOUND’,
requireStack: []
}

图表二能够显示图片,但是报错

京ICP备17009874号-2