Package.json test for Managing Packages w/ NPM

Tell us what’s happening:
Test fails to read my “author” key in package.json

Your code so far

{
  "name": "clean_blog",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Gary Netherton",
  "license": "ISC",
  "dependencies": {
    "express": "^4.17.1"
  }
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36 Edg/86.0.622.48.

Challenge: How to Use package.json, the Core of Any Node.js Project or npm Package

Link to the challenge:

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).


Can you please link to your repl.it

You seem to have changed the package.json file from how it was in the starter code.

https://repl.it/@NetGary0430/NoxiousMellowOpengl

I had been playing with Node at home from another project and used it in GitHub.

Code generated at home using npm init


{

"name": "clean_blog",

"version": "1.0.0",

"description": "",

"main": "index.js",

"scripts": {

"test": "echo \"Error: no test specified\" && exit 1"

},

"author": "Gary Netherton",

"license": "ISC",

"dependencies": {

"express": "^4.17.1"

}

}

Code from starter code shown below:


{

"name": "fcc-learn-npm-package-json",

"author": "Gary Netherton",

"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"

}

}

Unless you just changed it, it’s a network problem. It went from not passing to passing in the last 5 minutes. I was having problems making a network connection to the app.

My suggestion is to run the project and make sure you see the index page in the picture-in-picture browser, and then paste that link (it’s https://NoxiousMellowOpengl.netgary0430.repl.co for your project) into the test. You need to be able to see the index page or the app isn’t reachable and the tests won’t work.

{
	"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"
	},
	"author": "Gary"
}

Still failing. I am unsure how this could be a network issue as I am getting no errors in any other app or code.

Your code is passing for me.

Make sure you are running the code (press the run button) and using the correct URL.

https://NoxiousMellowOpengl--netgary0430.repl.co

Actually, I just learned something. I was submitting the link (URL) from the whole webpage rather than the link in the window to the right (which is another URL altogether).

THAT is what my problem was! If you had not included the comment about the “run” button (which I was doing) AND posted the link (which made me look at my browser link and wonder why they did not match) I would still be scratching my head.

I was sitting here going “see, I pressed the run button and there is all the stuff happening to the right and… wait a minute… what is that link over there?”

THANK YOU!!!