Managing Packages with Npm - How to Use package.json, the Core of Any Node.js Project or npm Package

Managing Packages with Npm - How to Use package.json, the Core of Any Node.js Project or npm Package
0

First did you cloned the glitch from FCC?
If have cloned your glitch app from FCC and update the package.json and use that share your app URL,
then the test will pass sucessfully.

3 Likes

I am currently experiencing the same issue.
I’ve done everything correctly but I can’t get it to pass.

I have the same issue with this challenge ,did you find the solucion guys?

Just clone the repo from freecodecamp, then using “Share your app”, then paste the link of the project to the solution form, it will pass, I have just passed by doing these step!

  1. It’s simple, clone this project.
    clone
  2. Change name

  3. Submit answer
9 Likes

Works fine, thanks !
I was sharing the direct link to the file instead of the application.
Any way to improve the Freecodecamp doc with the screenshots you sent me ?
I’d rather work locally and push to Github though so if you have a clue, I’ll gladly take it too !
Thanks again,
Franck

Now it can’t find the “licence” key even though it’s in the file…
Puzzling…

You should use the link of the live application. There is a button “Show live”. Then copy the link of the new opened window and put that link.

2 Likes

Hi @trungducng , which repo do we clone?
I never saw any introduction to Glitch prior to this lesson. What’s the link to the repo?

Hi, folks, I think you just need to open your app in browser via shared link of your app to make app working before you submit a challenge with your link.

I am still facing the issue: even though after following instructions form screen shots above. could any help pleas?https://glitch.com/edit/#!/babu-npm-intro?path=package.json:6:23

This is ridiculous. The instructions are horrible. Can’t get it to work. In addition. the ask for help button on the challenge does nothing. There seems to be mass confusion with this challenge. A million threads with no clear answer.

@mscanza I have to agree these are by far the hardest challenges for me as well, I just keep trying different stuff until it passes. I think glitch may have some glitches… but I really like MongoDB Lab (I have used it to demo prototypes at work). I think the challenge is coming up with an environment where the challenges can be worked that is free and open sourced. It would probably be easier if they set up an EC2 type instance in the cloud and built the challenge environment in the cloud but that costs a lot of money.

Hi Johnny, I actually figured out the source of much of the confusion. FCC is going to adjust the instructions. Make sure you login to Glitch from GitHub, not Facebook or any other options, this fixed everything, allowing the template to import correctly from github. Logout of glitch and back in using GitHub oauth.

1 Like

Hi FCC community!
I’m encountering a fundamental problem with this same assignment. Is this a FCC issue, a Glitch issue, or a user issue? Reproduction Steps:

  1. Browsed to glitch[dot]com, Signed Up with GitHub. Logged Out, Logged Back in using GitHub.
  2. Per section intro instructions, visited glitch[dot]com/#!/import/github/freeCodeCamp/boilerplate-npm to clone boilerplate code into new glitch project.
  3. Within project’s navigation panel, opened package.json and added new key/value pair to existing JSON object: "author": "Bernard Faucher",
  4. Using Glitch share button, obtained public URL: glitch[dot]com/~furry-cobalt
  5. Pasted the above URL into FCC’s solution field and clicked submit.
  6. Test output field displays: Unexpected token &lt; in JSON at position 0, summarizing chrome console error: jQuery.Deferred exception: Unexpected token < in JSON at position 0 SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at Object.eval (eval at <anonymous> (:1:1635), <anonymous>:1:102) at l (<anonymous>:2:29375) at c (<anonymous>:2:29677) undefined
  7. Per forum suggestion, used Glitch > Tools > Console to inspect file for errors using the command line: [email protected]:~ 17:32 $ cat package.json { "author": "Bernard Faucher", "name": "fcc-learn-npm-package-json", "dependencies": { "express": "^4.14.0" }, "main": "server.js", "scripts": { "start": "node server.js" }, "engines": { "node": "8.11.2" }, "repository": { "type": "git", "url": "https://idontknow/todo.git" } }
  8. ¯\_(ツ)_/¯

Any advice would be much appreciated! Thanks,
-B

@BernardFaucher, if I remix your project, (remix means copy/fork) and submit the remixed project it passes for me without changing a single thing, which means the app in and of itself is fine, the problem is somewhere with your glitch connection, so log out of glitch and log back in using your github and try again, if that doesn’t work, log out and log back in and try with a fresh copy of the boilerplate.

best of luck

Thanks for the swift reply, @Dereje1 !
I followed your advice re: logout > login, and with remixing the project to start fresh. I’m still seeing the same error, but it’s nevertheless awesome to get an external sanity check - it means I can safely rule out a problem with the test script & my own code, and can hold off on contacting Glitch support. For anyone following along at home, the next thing I’m going to try will be disabling various Chrome browser extensions, starting with DuckDuckGo Privacy Essentials 2019.3.22. If that approach doesn’t pan out, I’ll try a different browser.
Fingers Crossed,
-B

:trumpet:womp womp :trumpet:
Disabling my Chrome extensions didn’t do it.
Neither did switching to Edge browser.
Edge console output is, however, different from Chrome’s:

1. HTML1300: Navigation occurred.

[how-to-use-package-json-the-core-of-any-node-js-project-or-npm-package (1,1)](https://learn.freecodecamp.org/apis-and-microservices/managing-packages-with-npm/how-to-use-package-json-the-core-of-any-node-js-project-or-npm-package)
2. CSS3121: The media query -ms-viewport has been deprecated.

3. stripe has loaded

[component---src-layouts-index-js-bf46dd27ca03e7e59552.js (12,4315)](https://learn.freecodecamp.org/component---src-layouts-index-js-bf46dd27ca03e7e59552.js)
4. SCRIPT5007: SCRIPT5007: Unable to get property 'next' of undefined or null reference

[how-to-use-package-json-the-core-of-any-node-js-project-or-npm-package (12,869)](https://learn.freecodecamp.org/apis-and-microservices/managing-packages-with-npm/how-to-use-package-json-the-core-of-any-node-js-project-or-npm-package/)

hmmm… hard to trouble shoot since your error can’t be duplicated, are you seeing anything in your gitch editor log? (you can see your log by clicking in the bottom left of your glitch editor)
Also did you get a new boiler plate after you logged in and out using your github account?