trolster / urcli

CLI tool for the Udacity Reviews API
MIT License
100 stars 23 forks source link

Problems with assign #82

Closed BoPengGit closed 7 years ago

BoPengGit commented 7 years ago

Guidelines to submit an issue

I'm opening this issue because:

What's going wrong?

Hi Mike,

I'm trying to assign projects but am receiving an error. Any suggestions or help?

Creating or updating submission request..TypeError: Cannot read property 'map' of undefined at projects._assignConfig2.default.ids.reduce (C:\Users\Bo\AppData\Roaming\npm\node_modules\urcli\lib\commands\assign\createRequestBody.js:16:94) at Array.reduce (native) at createRequestBody (C:\Users\Bo\AppData\Roaming\npm\node_modules\urcli\lib\commands\assign\createRequestBody.js:16:40) at C:\Users\Bo\AppData\Roaming\npm\node_modules\urcli\lib\commands\assign\assign.js:132:49 at next (native) at step (C:\Users\Bo\AppData\Roaming\npm\node_modules\urcli\lib\commands\assign\assign.js:83:191) at C:\Users\Bo\AppData\Roaming\npm\node_modules\urcli\lib\commands\assign\assign.js:83:361 at process._tickCallback (internal/process/next_tick.js:109:7)

How can the urcli team reproduce the problem?

npm install -g urcli urcli token urcli assign 239 248

C:\Users\Bo>urcli assign 239 248 -V 4.0.3

supporting information:

trolster commented 7 years ago

Hi Bo, did you run urcli setup first? You shouldn't need to run urcli token until you token is about to expire. Here is the order for the setup:

  1. Run npm install -g urcli.
  2. Run urcli setup.
  3. Run urcli assign.
BoPengGit commented 7 years ago

Hi Mike,

Thanks for your reply. Appreciate the help. The urcli package was working before, but the newer version I'm having trouble. When I enter, urcli setup, it tells me to "Input your token:", but when I input something, it returns, [object Object] and goes back to the "Input your token:" line.

I'm not sure if that tells anything. It could be something with my computer as well. When I hit urcli certs, I do see the projects that I am certified for. Appreciate the help. This is a great tool!

Thanks and good job!

On Tue, Jun 6, 2017 at 11:44 AM, Mikkel Trolle Larsen < notifications@github.com> wrote:

Hi Bo, did you run urcli setup first? You shouldn't need to run urcli token until you token is about to expire. Here is the order for the setup:

  1. Run npm install -g urcli.
  2. Run urcli setup.
  3. Run urcli assign.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trolster/urcli/issues/82#issuecomment-306546222, or mute the thread https://github.com/notifications/unsubscribe-auth/ANE7F66dOLB4jEAN50bDX9Q7dmA5JmsKks5sBYHQgaJpZM4Nxm5G .

trolster commented 7 years ago

You can go back to a previous version by asking npm to install that specific version. In your case I suspect you were on 2.5.2, so the command is npm install -g urcli@2.5.2. That should get you back up and running on the old version.

As to what is going wrong you will need to fill out the rest of the issue template with the node version and your OS.

BoPengGit commented 7 years ago

Hi Mike,

Yes the previous version is working for me. So thank you for pointing that out. The new version was not working for me. I am on a windows computer.

Thanks and good job!

On Tue, Jun 6, 2017 at 12:06 PM, Mikkel Trolle Larsen < notifications@github.com> wrote:

You can go back to a previous version by asking npm to install that specific version. In your case I suspect you were on 2.5.2, so the command is npm install -g urcli@2.5.2. That should get you back up and running on the old version.

As to what is going wrong you will need to fill out the rest of the issue template with the node version and your OS.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trolster/urcli/issues/82#issuecomment-306552833, or mute the thread https://github.com/notifications/unsubscribe-auth/ANE7F6fn6E11xt_ta68GXhMDvfHnICyJks5sBYctgaJpZM4Nxm5G .

trolster commented 7 years ago

Hi Bo, what is the version of Node.js that you are on?

BoPengGit commented 7 years ago

Hi Mike,

The version I was using that caused the error was version 4.0.3. It was on a windows computer. Now, after going back to version 2.5.2 as suggested, it works great. Thanks for the help and great job in creating the tool.

Thanks and good job!

On Tue, Jun 6, 2017 at 12:28 PM, Mikkel Trolle Larsen < notifications@github.com> wrote:

Hi Bo, what is the version of Node that you are on?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trolster/urcli/issues/82#issuecomment-306559053, or mute the thread https://github.com/notifications/unsubscribe-auth/ANE7Fw93VYTtquKQqlvMTuAMGJbwP1xsks5sBYxFgaJpZM4Nxm5G .

trolster commented 7 years ago

Hi Bo, we're glad you like it. And of course, we'd like to figure out what caused the error. Could you try running the command, node -v in your terminal, and let us know what it prints out?

BoPengGit commented 7 years ago

Hi MIke,

Thanks so much for your reply and wanting to make a great tool. When I ran node -v, it returned, v6.10.3. Appreciate all your work!

Thanks and good job!

On Wed, Jun 7, 2017 at 12:11 PM, Mikkel Trolle Larsen < notifications@github.com> wrote:

Hi Bo, we're glad you like it. And of course, we'd like to figure out what caused the error. Could you try running the command, node -v in your terminal, and let us know what it prints out?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trolster/urcli/issues/82#issuecomment-306862224, or mute the thread https://github.com/notifications/unsubscribe-auth/ANE7F_4EepAuNC-L6tQZdWgJXwCN9vzTks5sBtnWgaJpZM4Nxm5G .

trolster commented 7 years ago

OK, I think now that I have all the info, my guess is that there was a network error when you set up the script (urcli setup). You may just want to try it again and make sure you're online. If that doesn't do it, I'll try updating the setup command to give some better error messages :-).

BoPengGit commented 7 years ago

Hi Mike,

I reinstalled the latest version, 4.0.3, and it works great now, the urcli setup command. Not sure what happened, but thanks for your help! That was exceptional work.

Thanks and good job!

RowlandOti commented 7 years ago

This issue may already have been solved, but just to reinforce what has been said (Since I faced it too). The error mention herein occurs when the urcli setup command is used without an internet connection, or connection could not be made. If you face this error, you should try again and ensure that the connection is made.

trolster commented 7 years ago

Hi @RowlandOti, since this is just an error message caused by a connection error, there is no one working on a fix right now. But thanks for the clarification.