It doesn’t look like there’s anything wrong with your JSON. However, the challenge you linked only asks for “author”, so perhaps you should try to delete everything besides that, and see if you pass the test.
{
"author": "Arslan",
}
Looking at the challenges after this one, you’ll see that you’ll add all of the other stuff later. (If this doesn’t work, try omitting the curly braces, as the example doesn’t use them on the challenge page.)
I’m having the same issue as mentioned in this post. Just started this section today and have the exact issue. Here’s my user agent in case it helps:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36.
I’ve also tried disabling AdBlockPlus and refreshing the window but this didnt change anything. In the Chrome Dev Tools Console I see these two errors:
jquery.js:3841 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 _callee$ (https://www.freecodecamp.org/js/frame-runner.265bddf5f727538e7585.js:25:88133), <anonymous>:1:102)
at s (https://www.freecodecamp.org/js/frame-runner.265bddf5f727538e7585.js:25:25742)
at f (https://www.freecodecamp.org/js/frame-runner.265bddf5f727538e7585.js:25:26044) undefined
frame-runner.js:70 SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Object.eval (eval at _callee$ (VM263 frame-runner.265bddf5f727538e7585.js:25), <anonymous>:1:102)
at s (VM263 frame-runner.265bddf5f727538e7585.js:25)
at f (VM263 frame-runner.265bddf5f727538e7585.js:25)
Quick Update: This exact issue happens for the next few challenge: adding the description key, the keywords array as well. On the keywords challenge I see a new error where I clicked submit and then the UI showed the test output:
// running tests
package.json should have a valid "keywords" key (Test timed out)
"keywords" field should be an Array (Test timed out)
"keywords" should include "freecodecamp" (Test timed out)
// tests completed
Unless there is something happening on the backend test runners here, I’m out of ideas. I’m on a very fast and stable internet connection. Any help is appreciated.
FYI: I’m not a beginner but wanted to go through these challenges for fun/practice and while the other sections for javascript have been working fine for the past few months this section appears to be fairly broken for running the tests.
Hi @camperextraordinaire, thanks for looking into this. I tried to submit using this url:
Trying again just now (after I saw your response) I’m still getting these errors:
// running tests
package.json should have a valid "author" key
// tests completed
I decided to try using a public github repo with the package.json I’ve been updating in the interim; same content. The online submission for the FCC challenges seems to have the same failure using that.
That worked, thanks! I must have some how missed that the expected URL for the submission was where the front facing app could be viewed. Personally, that’s extremely confusing for a section dedicated entirely to a file like package.json.
I can confirm this is an ongoing issue; reporting not valid input when it is valid. Tried with Glitch, JSBin, Codepen and my own server. The pure text json of my most recent attempt is here. I tried in Chrome and Safari.
I cloned the original GitHub project, loaded it to a personal repo on GitHub. After having updated the ‘package.json’ file, I copy/pasted this link : https://github.com/Braathen75/boilerplate-npm
Unfortunately, the test failed… And I don’t understand why. Could you help me with this ?
UPDATE: I finally passed the test using Glitch! Actually, it’s obvious: it was impossible to validate anything without using a platform… I’m really a rookie with Git and Glitch lol
The instructions on which URL to use really ought to be clearer in the lesson description… Glitch’s big ‘share’ button points to the project URL, not the live app URL, and the lesson doesn’t specify it needs to be the live URL.
This input field’s placeholder shows a codepen.io URL, so I tried that when the file’s raw Github URL failed.
Checking the console, what ever one pastes into the “Solution” input /_api/package.json will be appended. It seems that only Glitch works with the steps described by previous posters here, even though on the first page of the tutorial it says “Glitch” or “Github”.
As @Kohota107 already said, the URL required should be much clearer described.
What about the platform repl.it? All of you are refering to Glitch, but now in the instructions it refers to repl.it… and it doesn’t work either.
Any suggestions?