# Error building VegaLite

**URL:** <https://discourse.julialang.org/t/error-building-vegalite/30051>\
**Category:** New to Julia\
**Created:** [October 18, 2019, 10:54am UTC](https://discourse.julialang.org/t/error-building-vegalite/30051 "2019-10-18T10:54:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ennvvy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ennvvy/32/7816_2.png) [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Post date:** [October 18, 2019, 10:54am UTC](https://discourse.julialang.org/t/error-building-vegalite/30051/1 "2019-10-18T10:54:03Z")

</div>

I am trying to use Agents.jl package. However, while trying to add the package, I get the following error

```julia
  Building MbedTLS ─→ `~/.julia/packages/MbedTLS/a1JFn/deps/build.log`
  Building NodeJS ──→ `~/.julia/packages/NodeJS/rx0mH/deps/build.log`
  Building VegaLite → `~/.julia/packages/VegaLite/sHyyT/deps/build.log`
┌ Error: Error building `VegaLite`: 
│ 
│ > canvas@2.5.0 install /root/.julia/packages/VegaLite/sHyyT/deps/node_modules/canvas
│ > node-pre-gyp install --fallback-to-build
│ 
│ sh: 1: node-pre-gyp: Permission denied
│ npm ERR! file sh
│ npm ERR! code ELIFECYCLE
│ npm ERR! errno ENOENT
│ npm ERR! syscall spawn
│ npm ERR! canvas@2.5.0 install: `node-pre-gyp install --fallback-to-build`
│ npm ERR! spawn ENOENT
│ npm ERR! 
│ npm ERR! Failed at the canvas@2.5.0 install script.
│ npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
│ 
│ npm ERR! A complete log of this run can be found in:
│ npm ERR! /root/.npm/_logs/2019-10-18T10_55_54_204Z-debug.log
│ ERROR: LoadError: failed process: Process(setenv(`/root/.julia/packages/NodeJS/rx0mH/deps/bin/node-v10.15.0-linux-x64/bin/node /root/.julia/packages/NodeJS/rx0mH/deps/bin/node-v10.15.0-linux-x64/lib/node_modules/npm/bin/npm-cli.js install --scripts-prepend-node-path=true --production --no-package-lock --no-optional`; dir="/root/.julia/packages/VegaLite/sHyyT/deps"), ProcessExited(1)) [1]
│ 
│ Stacktrace:
│ [1] pipeline_error at ./process.jl:525 [inlined]
│ [2] #run#569(::Bool, ::typeof(run), ::Cmd) at ./process.jl:440
│ [3] run(::Cmd) at ./process.jl:438
│ [4] top-level scope at /root/.julia/packages/VegaLite/sHyyT/deps/build.jl:4
│ [5] include at ./boot.jl:328 [inlined]
│ [6] include_relative(::Module, ::String) at ./loading.jl:1105
│ [7] include(::Module, ::String) at ./Base.jl:31
│ [8] include(::String) at ./client.jl:432
│ [9] top-level scope at none:5
│ in expression starting at /root/.julia/packages/VegaLite/sHyyT/deps/build.jl:4
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/backwards_compatible_isolation.jl:649

```

I tried adding VegaLite, building packages, updating them. But, none of them seem to fix the problem.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [October 18, 2019, 11:05am UTC](https://discourse.julialang.org/t/error-building-vegalite/30051/2 "2019-10-18T11:05:13Z")

</div>

note:

> [@ennvvy](#):
>
> This is probably not a problem with npm. There is likely additional logging output above.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [October 18, 2019, 11:31am UTC](https://discourse.julialang.org/t/error-building-vegalite/30051/3 "2019-10-18T11:31:16Z")

</div>

On what platform are you trying this? We’ve seen this kind of error in docker containers before.

As a temporary workaround, you can `pkg> dev VegaLite`, and then run `npm install --scripts-prepend-node-path=true --production --no-package-lock --no-optional` in the folder `~/.julia/dev/VegaLite/deps`. You’ll need to install `npm` manually for that to work.

We are finally very close to fix these problems once and for all. Cairo.jl and Rsvg.jl are now ported to the new BinaryProvider.jl framework, and I believe that this problem will be solved once I port VegaLite.jl back to using Cairo.jl/Rsvg.jl.

---

<div class="post-metadata">

**Author:** ![ennvvy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ennvvy/32/7816_2.png) [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Post date:** [October 18, 2019, 3:20pm UTC](https://discourse.julialang.org/t/error-building-vegalite/30051/4 "2019-10-18T15:20:12Z")

</div>

I have now updated it with the entire output.

---

<div class="post-metadata">

**Author:** ![ennvvy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ennvvy/32/7816_2.png) [@ennvvy](https://discourse.julialang.org/u/ennvvy)\
**Post date:** [October 18, 2019, 4:41pm UTC](https://discourse.julialang.org/t/error-building-vegalite/30051/5 "2019-10-18T16:41:53Z")

</div>

I am using Julia on Google Colab. I tried `develop VegaLite`, and I get the following error

````julia
   Cloning git-repo `https://github.com/queryverse/VegaLite.jl.git`
  Updating git-repo `https://github.com/queryverse/VegaLite.jl.git`
 Resolving package versions...
 Installed ConstructionBase ─ v0.1.0
 Installed Setfield ───────── v0.5.0
  Updating `~/.julia/environments/v1.3/Project.toml`
  [112f6efa] + VegaLite v0.7.1-DEV [`~/.julia/dev/VegaLite`]
  Updating `~/.julia/environments/v1.3/Manifest.toml`
  [187b0558] + ConstructionBase v0.1.0
  [efcf1570] + Setfield v0.5.0
  [112f6efa] ↑ VegaLite v0.7.0 ⇒ v0.7.1-DEV [`~/.julia/dev/VegaLite`]
  Building VegaLite → `~/.julia/dev/VegaLite/deps/build.log`
┌ Error: Error building `VegaLite`: 
│ 
│ > canvas@2.6.0 install /root/.julia/dev/VegaLite/deps/node_modules/canvas
│ > node-pre-gyp install --fallback-to-build
│ 
│ sh: 1: node-pre-gyp: Permission denied
│ npm ERR! file sh
│ npm ERR! code ELIFECYCLE
│ npm ERR! errno ENOENT
│ npm ERR! syscall spawn
│ npm ERR! canvas@2.6.0 install: `node-pre-gyp install --fallback-to-build`
│ npm ERR! spawn ENOENT
│ npm ERR! 
│ npm ERR! Failed at the canvas@2.6.0 install script.
│ npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
│ 
│ npm ERR! A complete log of this run can be found in:
│ npm ERR! /root/.npm/_logs/2019-10-18T16_39_45_976Z-debug.log
│ ERROR: LoadError: failed process: Process(setenv(`/root/.julia/packages/NodeJS/rx0mH/deps/bin/node-v10.15.0-linux-x64/bin/node /root/.julia/packages/NodeJS/rx0mH/deps/bin/node-v10.15.0-linux-x64/lib/node_modules/npm/bin/npm-cli.js install --scripts-prepend-node-path=true --production --no-package-lock --no-optional`; dir="/root/.julia/dev/VegaLite/deps"), ProcessExited(1)) [1]
│ 
│ Stacktrace:
│ [1] pipeline_error at ./process.jl:525 [inlined]
│ [2] #run#569(::Bool, ::typeof(run), ::Cmd) at ./process.jl:440
│ [3] run(::Cmd) at ./process.jl:438
│ [4] top-level scope at /root/.julia/dev/VegaLite/deps/build.jl:4
│ [5] include at ./boot.jl:328 [inlined]
│ [6] include_relative(::Module, ::String) at ./loading.jl:1105
│ [7] include(::Module, ::String) at ./Base.jl:31
│ [8] include(::String) at ./client.jl:432
│ [9] top-level scope at none:5
│ in expression starting at /root/.julia/dev/VegaLite/deps/build.jl:4
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Pkg/src/backwards_compatible_isolation.jl:649```
````

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [October 19, 2019, 11:02am UTC](https://discourse.julialang.org/t/error-building-vegalite/30051/6 "2019-10-19T11:02:42Z")

</div>

Yes, you’ll get that error when you do the `dev`, but just ignore that and then run the command I suggested on the command line (if that works), and it should work, in theory 🙂
