Code Monkey home page Code Monkey logo

Comments (14)

addisonj avatar addisonj commented on June 1, 2024

Hi Tom,

Thats a weird one... can I get a bit more info from you?

Can you paste the output of the following:
npm ls -g canvas-data-cli
node -v
npm -v

Also, did you just install by doing npm install -g canvas-data-cli? I just published a new version (0.0.4) that you can try. If you just run that command again, it will update.

As far as the source of that error, it doesn't appear to be something you are doing wrong. This code is written in a newer version of javascript, es6, that we compile to an older version of javascript, es5, for compatibility. That errors seems to indicate you aren't getting the compiled version, but the untransformed source, which node can't handle yet.

Also, sorry for the rough edges, we are still working on getting a few bugs worked out which is why we haven't officially announced this yet through the Canvas Data forums, but I am glad to have one more data point to make sure we have all the kinks worked out!

from canvas-data-cli.

tlamy88 avatar tlamy88 commented on June 1, 2024

310 # npm ls -g canvas-data-cli
/usr/lib
└── [email protected]:[email protected]

311 # node -v
v0.10.40

312 # npm -v
1.4.28

Yes. I installed using this: npm install -g canvas-data-cli. I just ran it again and have the same version. 1.4.28. Still getting the error.

318 # canvasDataCli sampleConfig

/usr/lib/node_modules/canvas-data-cli/lib/logger.js:80
throw _iteratorError;
^
ReferenceError: Symbol is not defined
at Object. (/usr/lib/node_modules/canvas-data-cli/lib/logger.js:65:31)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/lib/node_modules/canvas-data-cli/lib/cli.js:6:14)
at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

Tom Lamy
Blackboard LMS Administrator
Department of Academic Technologyhttp://it.unh.edu/at
University of New Hampshire
10 Library Way
Durham, NH 03824
(603)862-0723 ph
(603)862-0323 fx

For immediate support, please call the IT Service Desk at 603-862-4242 or submit a web form request for service at https://itsupport.unh.edu/blackboard.

This email and any attachments may contain confidential and proprietary information that is for the sole use of the intended recipient. If you are not the intended recipient, disclosure, copying, re-distribution or other use of any of this information is strictly prohibited. Please immediately notify the sender and delete this transmission if you received this email in error.

A valid UNH IT communications never ask for personal or identifying information. If you are concerned about the validity of this communication, please contact the UNH IT Service Desk at 603-862-4242.

From: Addison Higham [mailto:[email protected]]
Sent: Friday, December 04, 2015 12:48 PM
To: instructure/canvas-data-cli [email protected]
Cc: Lamy, Thomas [email protected]
Subject: Re: [canvas-data-cli] Installing Canvas Data CLI (#1)

Hi Tom,

Thats a weird one... can I get a bit more info from you?

Can you paste the output of the following:
npm ls -g canvas-data-cli
node -v
npm -v

Also, did you just install by doing npm install -g canvas-data-cli? I just published a new version (0.0.4) that you can try. If you just run that command again, it will update.

As far as the source of that error, it doesn't appear to be something you are doing wrong. This code is written in a newer version of javascript, es6, that we compile to an older version of javascript, es5, for compatibility. That errors seems to indicate you aren't getting the compiled version, but the untransformed source, which node can't handle yet.

Also, sorry for the rough edges, we are still working on getting a few bugs worked out which is why we haven't officially announced this yet through the Canvas Data forums, but I am glad to have one more data point to make sure we have all the kinks worked out!


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-162032980.

from canvas-data-cli.

addisonj avatar addisonj commented on June 1, 2024

Hrm, have you tried using the new version of the CLI?

The only other thing I can think of is that the node version you have is fairly old. We expect node v0.12.x to work, but v0.10.x might be too old.

from canvas-data-cli.

mattharrison avatar mattharrison commented on June 1, 2024

Just installed this morning (12/11/2015) and I'm getting the same issue.

mharrison-laptop:~ mharrison$ canvasDataCli --help

/usr/local/lib/node_modules/canvas-data-cli/lib/logger.js:80
      throw _iteratorError;
            ^
ReferenceError: Symbol is not defined
    at Object.<anonymous> (/usr/local/lib/node_modules/canvas-data-cli/lib/logger.js:65:31)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/canvas-data-cli/lib/cli.js:6:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

mharrison-laptop:~ mharrison$ npm ls -g canvas-data-cli
/usr/local/lib
└── [email protected]

mharrison-laptop:~ mharrison$ node -v
v0.10.28

mharrison-laptop:~ mharrison$ npm -v
3.3.11

from canvas-data-cli.

mattharrison avatar mattharrison commented on June 1, 2024

I replaced the big try statement at the end of logger.js with:

for (var idx in levels){
    var level = levels[idx];
    Logger.prototype[level] = makeLogger(level);
}

And I seem to be off and running

from canvas-data-cli.

addisonj avatar addisonj commented on June 1, 2024

Okay, I figured out specifically the underlying cause of this.

The CLI uses a newer version of JS, ES2015 (aka ES6). However, ES2015 is not fully implemented in any JS runtimes so we use Babel to transpile the code that works in more runtimes. However, it still assumes some baseline features, one of those being Symbol.

Older versions of node, v0.10 and older, don't have this support and we aren't currently aren't adding a polyfill to add this support.

We actually don't officially support v0.10 in the tool and is specified by the package.json, but apparently that doesn't really do much more than warn you (and is easily missed!).

We may consider adding the polyfill in the future and officially supporting that version of node, until then though, try and upgrade and see if it causes you any issues.

from canvas-data-cli.

mattharrison avatar mattharrison commented on June 1, 2024

Ahhh, that explains why there are 20 lines to do a for loop....

from canvas-data-cli.

tlamy88 avatar tlamy88 commented on June 1, 2024

Hi Addison,

I have a need to download some of the files, so fixed this issue. It was pretty easy. I’ll explain below. Before I do, can you tell me how to download just the file or files I want? Or is this all or nothing?

Fixing /usr/lib/node_modules/canvas-data-cli/lib/logger.js:80
throw _iteratorError;

I originally began installing node.js like this:

curl --silent --location https://rpm.nodesource.com/setup | bash -

What I should have done is this:

curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -

From: Addison Higham [mailto:[email protected]]
Sent: Friday, December 11, 2015 12:58 PM
To: instructure/canvas-data-cli [email protected]
Cc: Lamy, Thomas [email protected]
Subject: Re: [canvas-data-cli] Installing Canvas Data CLI (#1)

Okay, I figured out specifically the underlying cause of this.

The CLI uses a newer version of JS, ES2015 (aka ES6). However, ES2015 is not fully implemented in any JS runtimes so we use Babel to transpile the code that works in more runtimes. However, it still assumes some baseline features, one of those being Symbol.

Older versions of node, v0.10 and older, don't have this support and we aren't currently aren't adding a polyfill to add this support.

We actually don't officially support v0.10 in the tool and is specified by the package.json, but apparently that doesn't really do much more than warn you (and is easily missed!).

We may consider adding the polyfill in the future and officially supporting that version of node, until then though, try and upgrade and see if it causes you any issues.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-164003848.

from canvas-data-cli.

addisonj avatar addisonj commented on June 1, 2024

Hi @tlamy88,

Glad to hear it worked, will close this issue. As far as downloading a single table, the newest version of the CLI has a new command fetch which will download a single table. The docs are here: https://github.com/instructure/canvas-data-cli#fetch

from canvas-data-cli.

Chkay avatar Chkay commented on June 1, 2024

Gentlemen,
Thanks for posting this as I ran into the same problem. My node is V0.10.13. I am running Windows 7 and cannot figure out how to update my node version. This is probably a question I should know the answer to, but I don't. Any help would be appreciated.

from canvas-data-cli.

tlamy88 avatar tlamy88 commented on June 1, 2024

Hi Addison,

Logging? I see the -l switch where I can add a log level, but how can I direct it to a log file? This is how I'm running it for one table:

% /bin/canvasdata fetch -l info -c /home/username/canvas/canvas_data/config.js -t pseudonym_dim

This returned "fetch command completed successfully". I guess could redirect the output, but I was wondering if there is a method to open the log file then close it.

Thank you

from canvas-data-cli.

tlamy88 avatar tlamy88 commented on June 1, 2024

I don’t know how you ran the setup on windows Chkay, but this is what I did wrong on Linux. I ran setup like this:

curl --silent --location https://rpm.nodesource.com/setup | bash -

This is how I fixed it:

I uninstalled nodejs and ran the 4.x setup like this:

curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -

Tom Lamy
Department of Academic Technologyhttp://it.unh.edu/at
University of New Hampshire

From: Chkay [mailto:[email protected]]
Sent: Thursday, March 03, 2016 10:09 AM
To: instructure/canvas-data-cli [email protected]
Cc: Lamy, Thomas [email protected]
Subject: Re: [canvas-data-cli] Installing Canvas Data CLI (#1)

Gentlemen,
Thanks for posting this as I ran into the same problem. My node is V0.10.13. I am running Windows 7 and cannot figure out how to update my node version. This is probably a question I should know the answer to, but I don't. Any help would be appreciated.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-191805580.

from canvas-data-cli.

Chkay avatar Chkay commented on June 1, 2024

Tom,
Thanks, and I need to change that chkay thing. I used the MSI and tried both their 4 and 5 versions. It just occured to me that the I may have old files hanging around in the ever helpful Windows system. I will check that.

from canvas-data-cli.

tlamy88 avatar tlamy88 commented on June 1, 2024

I just installed v4.3.2 LTS on my Windows 7 machine using the msi file.
I used a command prompt to go to C:\Program Files\nodejs
In that dir, I ran “node -v” and got v4.3.2.
I then ran “npm -v” and got 2.14.12.
Are you in the right directory?

Tom Lamy
Blackboard LMS Administrator
Department of Academic Technologyhttp://it.unh.edu/at
University of New Hampshire
10 Library Way
Durham, NH 03824
(603)862-0723 ph
(603)862-0323 fx

For immediate support, please call the IT Service Desk at 603-862-4242 or submit a web form request for service at https://itsupport.unh.edu/blackboard.

This email and any attachments may contain confidential and proprietary information that is for the sole use of the intended recipient. If you are not the intended recipient, disclosure, copying, re-distribution or other use of any of this information is strictly prohibited. Please immediately notify the sender and delete this transmission if you received this email in error.

A valid UNH IT communications never ask for personal or identifying information. If you are concerned about the validity of this communication, please contact the UNH IT Service Desk at 603-862-4242.

From: Chkay [mailto:[email protected]]
Sent: Thursday, March 03, 2016 10:49 AM
To: instructure/canvas-data-cli [email protected]
Cc: Lamy, Thomas [email protected]
Subject: Re: [canvas-data-cli] Installing Canvas Data CLI (#1)

Tom,
Thanks, and I need to change that chkay thing. I used the MSI and tried both their 4 and 5 versions. It just occured to me that the I may have old files hanging around in the ever helpful Windows system. I will check that.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-191822044.

from canvas-data-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.