PlotlyJS fails due to ORCA

I’m trying to use Plots.jl with PlotlyJS to produce simple plots, e.g.

using Plots
plotlyjs()
x = range(0,stop=1,length=100)
y = x.^2
Plots.plot(x,y, legend=false, linecolor="red")

This throws the following error due to ORCA:

Info: Precompiling ORCA [47be7bcc-f1a6-5447-8b36-7eeeff7534fd]
ERROR: LoadError: ORCA not installed properly. Please call `Pkg.build("ORCA")`

So I tried the above build command and it also fails:

julia> Pkg.build("ORCA")
   Building ORCA → `C:\Users\omrile\.julia\packages\ORCA\jdK40\deps\build.log`
┌ Error: Error building `ORCA`:
│ internal/modules/cjs/loader.js:800
│     throw err;
│     ^
│ 
│ Error: Cannot find module './internal/streams/stream'
│ Require stack:
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\node_modules\readable-stream\lib\_stream_readable.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\node_modules\readable-stream\readable.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\tracker-stream.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\index.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\npmlog\log.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\bin\npm-cli.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.<anonymous> (C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\node_modules\readable-stream\lib\_stream_readable.js:50:14)
│     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 Module.require (internal/modules/cjs/loader.js:852:19) {
│   code: 'MODULE_NOT_FOUND',
│   requireStack: [
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\node_modules\\readable-stream\\lib\\_stream_readable.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\node_modules\\readable-stream\\readable.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\tracker-stream.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\tracker-group.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\index.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\npmlog\\log.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\bin\\npm-cli.js'
│   ]
│ }
│ internal/modules/cjs/loader.js:800
│     throw err;
│     ^
│ 
│ Error: Cannot find module './internal/streams/stream'
│ Require stack:
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\node_modules\readable-stream\lib\_stream_readable.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\node_modules\readable-stream\readable.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\tracker-stream.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\tracker-group.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\index.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\npmlog\log.js
│ - C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\bin\npm-cli.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.<anonymous> (C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\node_modules\npm\node_modules\are-we-there-yet\node_modules\readable-stream\lib\_stream_readable.js:50:14)
│     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 Module.require (internal/modules/cjs/loader.js:852:19) {
│   code: 'MODULE_NOT_FOUND',
│   requireStack: [
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\node_modules\\readable-stream\\lib\\_stream_readable.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\node_modules\\readable-stream\\readable.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\tracker-stream.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\tracker-group.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\are-we-there-yet\\index.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\node_modules\\npmlog\\log.js',
│     'C:\\Users\\omrile\\.julia\\artifacts\\345df2b824d1eacefab89d560a9e929ff24c0537\\node_modules\\npm\\bin\\npm-cli.js'
│   ]
│ }
│ ERROR: LoadError: failed process: Process(`'C:\Users\omrile\.julia\artifacts\345df2b824d1eacefab89d560a9e929ff24c0537\npm.cmd' config set scripts-prepend-node-path true`, ProcessExited(1)) [1]
│ 
│ Stacktrace:
│  [1] pipeline_error at .\process.jl:525 [inlined]
│  [2] run(::Cmd; wait::Bool) at .\process.jl:440
│  [3] run at .\process.jl:438 [inlined]
│  [4] main() at C:\Users\omrile\.julia\packages\ORCA\jdK40\deps\build.jl:4
│  [5] top-level scope at C:\Users\omrile\.julia\packages\ORCA\jdK40\deps\build.jl:30
│  [6] include(::String) at .\client.jl:457
│  [7] top-level scope at none:5
│ in expression starting at C:\Users\omrile\.julia\packages\ORCA\jdK40\deps\build.jl:30
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:942

I’m using Julia Pro 1.5.0-1 on Windows 10.

Thanks in advance!

Works for me:

(FinEtoolsFlexBeams) pkg> build ORCA                                                                                                                                  
   Building ORCA → `C:\Users\PKrysl\.julia\packages\ORCA\jdK40\deps\build.log`                                                                                        
                                                                                                                                                                      
(FinEtoolsFlexBeams) pkg> st                                                                                                                                          
Project FinEtoolsFlexBeams v0.2.0                                                                                                                                     
Status `C:\Users\PKrysl\Documents\work\FinEtoolsTestAll.jl\tests\FinEtoolsFlexBeams.jl\Project.toml`                                                                  
  [7d9fca2a] Arpack v0.4.0                                                                                                                                            
  [6e4b80f9] BenchmarkTools v0.5.0                                                                                                                                    
  [39dd38d3] Dierckx v0.4.2                                                                                                                                           
  [35a29f4d] DocumenterTools v0.1.7                                                                                                                                   
  [91bb5406] FinEtools v4.6.1                                                                                                                                         
  [e9187c00] FinEtoolsDeforLinear v0.2.0 `https://github.com/PetrKryslUCSD/FinEtoolsDeforLinear.jl.git#master`                                                        
  [7073ff75] IJulia v1.21.3                                                                                                                                           
  [682c06a0] JSON v0.21.0                                                                                                                                             
  [98b081ad] Literate v2.6.0                                                                                                                                          
  [47be7bcc] ORCA v0.4.0                                                                                                                                              
  [f0f68f2c] PlotlyJS v0.13.1                                                                                                                                         
  [286e6d88] SymRCM v0.2.0                                                                                                                                            
  [37b6cedf] Traceur v0.3.1                                                                                                                                           
  [b77e0a4c] InteractiveUtils                                                                                                                                         
  [37e2e46d] LinearAlgebra                                                                                                                                            
  [9abbd945] Profile                                                                                                                                                  
  [2f01184e] SparseArrays                                                                                                                                             
  [8dfed614] Test                                                                                                                                                     
                                                                                                                                                                      
julia> versioninfo()                                                                                                                                                  
Julia Version 1.5.0                                                                                                                                                   
Commit 96786e22cc (2020-08-01 23:44 UTC)                                                                                                                              
Platform Info:                                                                                                                                                        
  OS: Windows (x86_64-w64-mingw32)                                                                                                                                    
  CPU: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz                                                                                                                      
  WORD_SIZE: 64                                                                                                                                                       
  LIBM: libopenlibm                                                                                                                                                   
  LLVM: libLLVM-9.0.1 (ORCJIT, sandybridge)                                                                                                                           
Environment:                                                                                                                                                          
  JULIA_NUM_THREADS = 4   

Could it be your JavaScript environment?

Here is my version info:

julia> versioninfo()
Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i9-7920X CPU @ 2.90GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_DEPOT_PATH = C:\Users\omrile\.julia;C:\Users\omrile\AppData\Local\JuliaPro-1.5.0-1\Julia-1.5.0\local\share\julia;C:\Users\omrile\AppData\Local\JuliaPro-1.5.0-1\Julia-1.5.0\share\julia
  JULIA_EDITOR = "C:\Users\omrile\AppData\Local\JuliaPro-1.5.0-1\app-1.49.0\atom.exe"  -a
  JULIA_NUM_THREADS = 12
  JULIA_PKG_SERVER = pkg.juliahub.com

What should I check regarding JavaScript?

Well I was thinking about this error message:
Error: Cannot find module ‘./internal/streams/stream’
This looks like it’s coming from JavaScript.

Yes, I tried googling this error and found a bunch of Node.js stuff. I’m not sure how to fix this as I have absolutely no experience with Java or Javascript, I just installed a fresh Julia Pro.

I would file an issue with ORCA: They would know how they access node.js. Sorry I couldn’t help more.

You might try with just vanilla Julia

3 Likes

Thanks, this actually worked.
I guess there’s some conflict in Julia Pro.

most likely all the testing is against vanilla julia so I suspected a conflict that wasn’t caught.

Due to the problems with ORCA.jl, we have decided to go another direction. The savefig functionality offered by ORCA.jl has been implemented by new routines built in to PlotlyBase.jl (and thus PlotlyJS.jl) itself.

ORCA.jl is now deprecated and should not be used going forward.

Thank you

2 Likes

Is the new behavior what we get with a registered version of PlotlyJS? I’ve got
PlotlyJS v0.13.1
which still seems to pull in ORCA.

The change comes with PlotlyBase v0.4, which is the minimum required version for PlotlyJS.jl version 0.14.0

I think you’ll need to upgrade your PlotlyJS.jl to get the changes.

1 Like