Managing Packages with NPM - How to Use package.json, the Core of Any Node.js Project or npm Package - Public Webpage Requirements and Replit.com Issues

I have cloned the repository for the first back-end activity with Node.js on GitHub The project says I need a place for my webpage to be publicly viewable. I have bought a domain name with GoDaddy, but I did not buy “hosting” capabilities.
Is hosting required?

I have also tried using Replit.com but I am getting this error at replit.com.

//-------------------
Error: Cannot find module ‘/home/runner/boilerplate-npm/index.js’
Require stack:

  • /nix/store/29fdcv1yhlll61ml8a31qdkrbprxd7gs-prybar-nodejs-0.0.0-67f7a00/prybar_assets/nodejs/module-context-hook.js
  • /tmp/prybar-nodejs-198042728.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.resolve (node:internal/modules/cjs/helpers:109:19)

//----------------

Can someone tell me whether I need to host a site or not to complete the first activity?

If so, what sites have you used and which ones are free?

Can someone who was successful with taking the replit.com route tell me if they experienced the same error message?

Below is the package.jason file that I modified for replit.com. I have made myself the author.

{
“name”: “fcc-learn-npm-package-json”,
“author”:“Mark Spindler”,
“dependencies”: {
“express”: “^4.14.0”
},
“main”: “server.js”,
“scripts”: {
“start”: “node server.js”
},
“repository”: {
“type”: “git”,
“url”: “https://idontknow/todo.git
}
}

I appreciate the help.

Your browser information:

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

Challenge: Managing Packages with NPM - How to Use package.json, the Core of Any Node.js Project or npm Package

Link to the challenge:

Hi Randell,

Here is the link:
boilerplate-npm - Replit

It appears you did not follow the 3rd step in the challenges instructions shown below:

  • Start by importing the project on Replit.
  • Next, you will see a .replit window.
  • Select Use run command and click the Done button.

This is quite common for users new to the backend challenges and it is easy to miss.

The easiest thing to do is delete that replit and click on the starter link again and make sure you do step 3 above.

Thank you so much. This was very effective advice/tech support.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.