Problems with Repl.it not able to find module 'express'
LukeZeller (1)

Hello!
I've been having a problem where whenever my repl wakes up, it throws this error:

internal/modules/cjs/loader.js:550
    throw err;
    ^

Error: Cannot find module 'express'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
    at Function.Module._load (internal/modules/cjs/loader.js:475:25)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (/home/runner/index.js:1:77)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
exit status 1

The way I've found to fix it is to rename package.json to something else, start the repl, fix the name of package.json, and restart the repl.
Is there a fix on the way? Or a better way to do this?

You are viewing a single comment. View All
LukeZeller (1)

@turbio the package in question was installed automatically, and when i rename the pacakge.json file, the package works fine.