cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kevinw
Community Contributor

CLI Install Failing in Ubuntu

Jump to solution

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

Accepted Solutions

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

8 Replies
chofer
Community Coach
Community Coach

Hi  @kevinw ‌...

I shared this to https://community.canvaslms.com/groups/big-data/overview for you.  Good luck!

kevinw
Community Contributor

Thanks! At this point it appears that I'll be needing a great deal. 

stuart_ryan
Community Coach
Community Coach

Hi  @kevinw ,

Can I ask is CentOS at all an option? I have personally managed to get it up and running in CentOS 7 so can validate that it all works (and could offer any assistance if you ran into issues). I will admit I am greatly more familiar with CentOS's handling of packages over Ubuntu.

Just an option if nobody is able to assist with the Ubuntu scenario. In case I get some time (and just in case someone else can chime in), could you please advise the version of Ubuntu you are using? That would help greatly in troubleshooting.

Cheers,

Stuart

kevinw
Community Contributor

Hey  @stuart_ryan ‌, 

Thanks for the reply. CentOS could be an option if all else fails. I'm not sure exactly what went wrong here, or how, but the Canvas-Data team isn't responding, although I do have an email out to my CSM to see what he can dig up. 

I'm currently running Linux Mint 18.2 Sonya

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

kevinw
Community Contributor

I think the problem is actually with NPM. My nodeJS appears to be just fine. It looks like I'm going to have to tackle this error first: 

NPM Error

ARGHHHH!!!!!!!!

kevinw
Community Contributor

Holy Crap it worked! I had no idea I had to install build essential. I'm not even sure what it is, but as soon as I installed it the CLI download and calling from the command line went just fine! Thanks so much. 

Hi  @kevinw ,

Huzzah! So glad that it worked! Glad to help out and glad we got you there in the end too!

Cheers,

Stuart