I have been stuck on this challenge:https://learn.freecodecamp.org/apis-and-microservices/managing-packages-with-npm/expand-your-project-with-external-packages-from-npm
Here is what I have tried:https://glitch.com/edit/#!/arjun-taneja
Pls help
I have been stuck on this challenge:https://learn.freecodecamp.org/apis-and-microservices/managing-packages-with-npm/expand-your-project-with-external-packages-from-npm
Here is what I have tried:https://glitch.com/edit/#!/arjun-taneja
Pls help
{
"author": "Arjun Taneja",
"version": "1.0.0",
"name": "fcc-learn-npm-package-json",
"description": "A project that does something awesome",
"keywords": [ "freecodecamp", "learning", "loop" ],
"dependencies": {
"package-name": "version",
"express": "2.14.0",
"moment": "2.14.0",
},
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"engines": {
"node": "8.11.2"
},
"repository": {
"type": "git",
"url": "https://idontknow/todo.git"
},
"license": "MIT"
}
You need to separate each key/value pair with a comma, see if that fixes it.
do i have to copy the app or the code?
it doesnt work with either
You canāt have a comma in the last element in your package.json
file:
"dependencies": {
"package-name": "version",
"express": "2.14.0",
"moment": "2.14.0",
},
Remove the comma after the moment
dependency.
I just did what asked to me to do and the same thing happened.
Pls help
There should be a comma after each key-value pair except for the last ones.
{
"author": "Arjun Taneja",
"version": "1.0.0",
"name": "fcc-learn-npm-package-json",
"description": "A project that does something awesome",
"keywords": [ "freecodecamp", "learning", "loop" ] //comma here
"dependencies": {
"package-name": "version",
"express": "2.14.0",
"moment": "2.14.0"
},
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"engines": {
"node": "8.11.2"
},
"repository": {
"type": "git",
"url": "https://idontknow/todo.git"
},
"license": "MIT"
}
Can I see your error?
Itās ok. I found the problem.
You have āpackage-nameā: āversionā
in your dependencies right?
It shouldnāt be there. Remove it. That is just the format to include external packages.
it still doesnt work
I see what is wrong now. You are required to include moment with a version number of 2.14.0 and express with version of 4.14.0. Try that and do not linebreak.
{
"author": "Arjun Taneja",
"version": "1.0.0",
"name": "fcc-learn-npm-package-json",
"description": "A project that does something awesome",
"keywords": [ "freecodecamp", "learning", "loop" ],
"dependencies": {
//no linebreak
"express": "2.14.0",//change to 4.14.0
"moment": "2.14.0"
},
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"engines": {
"node": "8.11.2"
},
"repository": {
"type": "git",
"url": "https://idontknow/todo.git"
},
"license": "MIT"
}
THAAANK YOUUUUUU
No worries. It was just a minor mistake. It will all seem a bit confusing in the beginning, but then youāll come to realise that it is very easy.