Managing Packages with Npm: how is the glitch or github functionality intended to work_?

(reposting from help to support. it’s website functionality that I’m struggling with, not the concepts in the lessons)
How is this supposed to work?
Following the glitch link and making the trivial addition to the package file still results in a

// running tests
Unexpected token < in JSON at position 0
// tests completed

Tried initially without logging in (which fails to even import the proper template), then tried after logging in with github auth based on the advice in this forum post. Same result.

I’ve also tried cloning the repo and using the link to my repo on github for this lesson (direct link to package file in that repo). Still failing, though it at least appears to test…something

// running tests
// tests completed

…and of course it leads me to questions like:

  • Do I have to maintain the provided branch name/structure, or can i use dev/master/feature branches like i would in any other case?’
  • Do I provide a link to the base repo? Specific file? Specific branch? ?

This isn’t terribly important from a learning perspective (in the sense that I’m currently covering things I already use), but I really would like my fcc profile to reflect completion. If someone can explain to me how the github option should work, I would definitely prefer that over glitch.

What is your code you are trying on glitch? I used glitch all the way through the challenges and projects. It was not without frustration but it does work. (Actually the only frustration with glitch was needing to know to log in with GitHub. I suspect I would also have had frustrations with the GitHub path as well.)

The very first lesson in the section. It’s just adding an author to the package file. No logic, nothing even remotely interesting…but I cannot get the freecodecamp site to verify it.

You need to use the web address for your app - click on “show”, then click on “In a new window”. Copy that web address to paste into your solution on fCC. I did this with your app and it passed the test.

Ok. Thank you both! That clears up the ‘how is glitch supposed to work’ question.

I’d still like to know how the github option is intended to work, but I can at least continue to have my progress recorded. Thanks again.

1 Like

I’m a little curious about how using GitHub would work also. When I fire up my computer again tomorrow I’m going to try to create a new empty repository on GitHub, clone the fCC repository to Visual Studio Code, complete the challenge, push to GitHub, then try the link to my repository as the solution. I don’t know if that is how to do it. If you try something like that before I do reply whether it worked or not.

Ok, thanks @camperextraordinaire, that makes sense. The GitHub link is just there to get the boilerplate code if you want to host it somewhere other than glitch.