Replit Error: Cannot find module 'express' when running Quality Assurance and Testing with Chai

This error is generated when clicking on the Run button with this project: boilerplate-mochachai-3

Here’s the URL to the project

I clicked on the boilerplate link today. This problem was also encountered by a co-worker earlier today.

Thanks,

…Ron

There was a recent change made on repl.it that has caused some problems with what gets installed first when the Run button is clicked. We have fixed all of the boilerplates except this one and one other.

Until we roll out the fix, try clicking the 3 dots in the upper right-hand portion of the Files section and select “View hidden files”. You will see a .replit under Config files. Open it up and you will see something like the following:

language = "nodejs"
run = "npm start"

[nix]
channel = "stable-22_05"

Try changing it to:

run = "npm start"
entrypoint = "server.js"

[packager]
language = "nodejs"

  [packager.features]
  packageSearch = true
  guessImports = true
  enabledForHosting = false

and click Run again. Hopefully, it will install the necessary files and you can continue working on the project.

3 Likes

That resolved the problem. Thanks a lot for your help!

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