New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Managing Packages with Npm - How to Use package.json, the Core of Any Node.js Project or npm Package #17584
Comments
@P1xt I looked at the source code of this challenge here. The tests will pass only when Thus, a github url will never pass the test. Also, if you use any glitch project other than If you look at the app.route('/_api/package.json')
.get(function(req, res, next) {
console.log('requested');
fs.readFile(__dirname + '/package.json', function(err, data) {
if(err) return next(err);
res.type('txt').send(data.toString());
});
}); This needs to be present only then the tests will pass. |
@anku255 Yes, that is my point. The instructions specifically state that you can clone and use the github repo instead of Glitch - but
Also, using Glitch to do the project was (for me) impossible on Chrome. |
Hi @P1xt , @anku255 |
@mihir-mahakalkar this solution worked for me. Well done. Thanks! |
same as @rabindranathfv, I noticed that after cloning the glitch project it thinks there is no 'package.json' and to run 'refresh' from the console. After which there are very few files left. steps:
confirmed on codesandbox.io as well by cloning the github repo with a similar error message. On attempting to create a new sandbox from the github repo there is an error about missing package.json and the clone fails. steps:
|
Glitch not working at all, neither is cloning from github. Changing the package.json in glitch, and it basically deletes all the files, then tries to look for /app/server.js from the bootstrap. Doesn't read the json from github raw |
The section "Introduction to the Managing Packages with NPM Challenges" using the git repo, the instructions to run Maybe the instructions should suggest what @unicorn93 mentioned (#17584 (comment)) or have them create an If you look at the challenges in the section, it's only a newbie intro to |
This worked for me as well on a fork of tha repo. Because the check function as @anku255 noticed look fro that path |
I cant unterstand what need to do.. I did everything suggested here, but it's not work |
I used github to do the "Basic Node and Express" tutorial but when I gave it my link, it always gave me a 404 error message even though I submitted the raw JSON and checked my answers online. If you checkout the following users in the thread, anku255 and unicorn93, they provide a solution to the problem. However, this only worked for the "Managing packages with npm" tutorial but not the Node and Express. If you take a look at line 17 in the following link, here, it shows what url is required and what it appends. I did that way but it still didn't work. |
Having the same issue. Code and app link I submitted. (Actually, I tried all links Glitch would give me -- project, live app, code, and the "view" page link.) Firefox 77.0.1 (64-bit, Win 10). |
@themagicbean , Whilst this may not be the issue you are facing, please note: Glitch has been highly unstable, for the past month. The status of Glitch can be found here: https://status.glitch.com/ |
@scissorsneedfoodtoo now that we've moved off of Glitch, is this issue resolved? |
Tested with the current production site and by forking the boilerplate-npm repo with this link on the Introduction to the Managing Packages with npm Challenges intro page: https://repl.it/github/freeCodeCamp/boilerplate-npm Went through all the challenges in this section on Repl.it and didn't run into any issues. |
Hello, I've just started this course and have experienced the same error as reported before, however, I am using Repl.it. I tried the earlier suggestion of sharing the raw data link from Github and still get an error about missing a valid author key. I also tried removing all the existing code so the file only had |
@hollidayeric The link you are providing in the solution box is not the link to the live app the tests need access to. The link to submit should look something like: And is available to copy from the preview browser URL bar Hope this clarifies |
@SKY020 - Thank you! I still had trouble with https://boilerplate-npm.hollidayeric.repl.run. I opened the editor in a new window and noticed the link is slightly different for the program. It is running and works to submit the lessons with this link: https://boilerplate-npm.hollidayeric.repl.co |
|
Describe your problem and - if possible - how to reproduce it
In Introduction to the Managing Packages with npm Challenges it says to click the following link to create a glitch project for the following lessons:
https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-npm
or to clone the following repository:
https://github.com/freeCodeCamp/boilerplate-npm/
I did both and tried both for the next lesson How to Use package.json, the Core of Any Node.js Project or npm Package.
Cloning the repo and changing it just flat out doesn't work. Here's my repo on Github. If I put a link to my repo and submit the challenge, it fails with the message "package.json should have a valid "author" key" and this in the console:
it looks like the test is adding
api
into the filename and not even finding the package.json.The issue with glitch is a bit trickier. It works fine on Firefox. However, if you use the original link at the start of the npm lessons to create your glitch project on Chrome, instead of getting a clone of the FCC project as your starter project, you get the base glitch app as your starter project. And, it doesn't work for the tests. (This is the app I got, https://flashy-paperback.glitch.me, it's not the FCC starter)
Note: If you originally create the Glitch app by clicking the "click here" on Chrome, the app that is created won't work for submitting lessons regardless of browser. You have to actually "click here" on Firefox, then you get a Glitch project that will work for the lessons in Firefox or Chrome.
Note that the Chrome issue might be more a Glitch issue with Chrome on Manjaro, for some reason Glitch runs super-slow, lags out, and crashes on Chrome for me.
Add a Link to the page with the problem
Tell us about your browser and operating system
If possible, add a screenshot here
The text was updated successfully, but these errors were encountered: