Error updating test.js file

Error updating test.js file
0.0 0


How do i EDIT the package.json file ? Ive re-read the backend lessons and dont see it. Please advise.

ec2-user:~/workspace $ cat <package.json
    "name": "@clear/workspace",
    "version": "1.0.0",
    "main": "index.js",
    "scripts": {
        "test": "node test.js"},
    "author": "",
    "license": "ISC",
    "description": "",
    "dependencies": {
        "@linclark/pkg": "^1.0.2"}

ec2-user:~/workspace $ how-to-npm verify
Could not verify: SyntaxError: /home/ec2-user/workspace/package.json: Unexpected end of JSON input
at Object.parse (native)
at Object.Module._extensions…json (module.js:587:27)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.exports.verify (/home/ec2-user/.nvm/versions/node/v6.12.3/lib/node_modules/how-to-npm/problems/06-npm-test/index.js:18:12)
at LegacyAdventure.WA.executeExercise (/home/ec2-user/.nvm/versions/node/v6.12.3/lib/node_modules/how-to-npm/node_modules/workshopper-adventure/index.js:425:16)
at LegacyAdventure.WA.process (/home/ec2-user/.nvm/versions/node/v6.12.3/lib/node_modules/how-to-npm/node_modules/workshopper-adventure/index.js:317:17)


I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

I could be wrong, but it appears you are missing an extra } at the end.


curly brace is present in code. I missed it during copy/paste


If by EDIT you mean make changes to the package.json file, have you tried a text editor?

What specifically are you wanting to edit?


Thank you for your help. I deleted the package.json and reinstalled it with the node test.js entered in the scripts object from the beginning then created the test.js file. Im fairly new to all this but after rereading the prior steps there is no mention of how to create a file, create a directory or how to edit text in the command line which can be troublesome for beginners like me.

Additionally the AWS cloud services site has been updated and the steps from the video do not reflect the lesson steps. This is the first lesson for the backend and not being able to follow along with the video is frustrating.


Things like “how to create a file”, “how to create a directory”, and “how to edit a text file” fall under what I would consider knowing how to use your computer. Even if that was within the scope of FCC, it’s way to broad and diverse to be doable in any meaningful way.

If you want to do everything from the command line and don’t know how, most of what you’re talking about is easy to find. "How to edit a file from command line, " is not hard to Google.


I agree that these don’t need to be brought up in the curriculum. A quick google search tells you all you need to know: mkdir Folder, cd Folder, nano text.txt. Also, do you not have a text editor? Why are you working in the terminal?

I’m confused. What does AWS and some video have to do with freeCodeCamp? I was not aware we even had a video tutorial for this let alone using AWS… please correct me if I’m wrong.


The site the video instructions refer to has been altered because AWS bought Cloud9…

Below you’ll find a link to the lesson in question from your site.

Your’re making assumptions about beginners even knowing how to phrase a question or the jargon of the command line interface.


I don’t know a lot about cloud9. What’s the reason you can’t use it now it belongs to AWS? Is it just because they want a credit card for the sign-up?

I suppose the reason there aren’t more detailed instructions for using the terminal is because Freecodecamp assumes that you’ll use cloud9 or some other IDE.

Anyway - you definitely need to know how to use an editor and the command line before you can use Node locally. VS Code is a common choice of editor - as are Atom and Brackets. You probably have at least vi and nano already installed for making simple edits but it’s easier with a more modern interface. You should find a simple introduction to using the command line for whichever OS you have and go through the basics.