Hi there. I am encountering a perplexing issue with the first exercise in the APIs and Microservices curriculum.
The exercise is called: “How to Use package.json, the Core of Any Node.js Project or npm Package”
Here are my steps:
1- I click the link to Replit starter project:
2- Alter package.json to include the key/value pair “author”: “nick”,
I also tried copy/pasting the suggested solution
I also tried deleting all other content apart from “author”: “nick”
Get Response: “package.json should have a valid “author” key”
Are others experiencing the same problem? I know the package.json file has been updated because if I enter “cat package.json” on the Replit console I see the “author”: “value” pair as I entered it.
Would love to know if I’ve messed up at some point. As far as I can tell I’ve followed multiple suggested solutions to no avail.
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.
Thanks for the quick responses Dennis. Unfortunately there must be another problem. I have the exact same error when I override the package.json content with your code snippet, just the same as if I use the problem solution content from FCC.
Thank you for the markup tips. That’s good to know!
I even attempted forking with gitHub, cloning, changing package.json locally, pushing and then uploading to replit via gitHub. Once again the same error.
@Nick-W If you run the project and open it up in a new tab does it load for you? It doesn’t seem to work for me.
This might sound silly but can you try creating a new free account and see if it works on that account. I believe the pay accounts are on their own cluster so it’s just a test to see if using a free account will change your project location.
You’re not alone in having these issues with Replit. I had the exact same problem on Friday, I could even copy-paste the solution provided and it wouldn’t work. Eventually, after forking the project and trying over and over again, I guess I got lucky and it worked. It certainly wasn’t my code, because I was copy-pasting the whole file every time, changing nothing. I continued to experience an exciting variety of issues with replit throughout the day.
I actually ended up on the forum today because I am trying to start the “Basic Node and Express” section, and the Replit is refusing to run the forked code. (zero modification, throws an error) Enough page refreshes and re-forks and it eventually started running.
Basically, you’re not crazy, Replit is just being buggy. Keep trying, it’ll eventually work (probably). Or complete it locally and find somewhere to host it? Maybe run it locally with Apache and tunnel out with ngrok?
update
So I do believe I’ve found a process that gets replit to work:
fork the project
try running the project (it will fail)
click the “open in new tab” icon to the right of the URL (in the editor)
try running the project again (this time it should run)
Now you can make changes. The refresh button doesn’t appear to work however, so you’ll have to stop/start the project again for your changes to be reflected.
I’ve also discovered another replit bug, which is that, in “my repls” all the replits you’ve created can’t be deleted. The settings button both opens a menu and acts as a link taking you to the project.
Haha I see you’ve had the runaround with Replit too! This is my first time using this website and I can’t say I’m impressed with it’s current state. So today I’m encountering a whole new host of issues myself.
Running the projects is no longer working at all (they were yesterday). Forking does not seem to come to the rescue in my case. Nor does creating a new account. Fortunately, the one thing which didn’t work yesterday (deleting my repls) is now working! Hopefully the fix the rest of the issues soon!
Unfortunately, it doesn’t really matter which service we use for the projects, there will always be issues. We used to use Glitch before switching to Replit.
You can try using Glitch it isn’t much different from Replit and should work just fine. When you create a new project you have the option to import from GitHub and you just give it the starter project GitHub URL.
Yep worked first time with Glitch. Thank you SO much. Maybe worth directing people to this method while Replit is being buggy. Hopefully they fix their end soon.