CLI Install Failing in Ubuntu

Jump to solution
kevinw
Community Contributor

I am having the hardest time getting the CLI up and running in Ubuntu. In windows, I get it just fine. 

Upon install I get this error: 

CLI Error

It's telling me I need a certain version of Chai, which I have made sure that I have. 

The only response I can get from it is when I type "canvasDataCli" and it screams this: 

kevin-HP-Pavilion-Laptop-15-cc1xx ~ # canvasDataCli
module.js:538
throw err;
^

Error: Cannot find module './lib/Api'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/canvas-data-cli/index.js:2:8)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)

Can anyone help me out with this?

PS. I posted this in developers because that forum is much more active, but if a moderator could cross-list it to the Canvas Data group that would be great. 

1 Solution

Hi  @kevinw ‌,

No worries at all. I pulled down a fresh ISO of Linux Mint 18.2 Sonya, and followed the following and it all seemed to install OK first time:

  1. Installed Linux Mint to internal drive
  2. Installed NodeJS
    curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -sudo apt-get install -y nodejs
  3. Installed Build Essential
    sudo apt-get install -y build-essential
  4. Then install the command line API 
    npm install -g canvas-data-cli

I am just wondering, did you install the build-essential tools, and is this a fresh install of Linux Mint (or existing)?

The only other thing I could think is try to uninstall and then reinstall the latest NodeJS in case there is something wrong in the environment?

Look forward to how you progress.

Cheers,
Stuart

View solution in original post