Error: Cannot find module '/app/node_modules/webpack/bin/webpack.js'

Yesterday, I was having the problem that my project wasn’t updating. When I would make changes, the update wheel would spin and spin and never stop. You said there were some updates being made on the Glitch site that may have affected it and you’re working through it.

Today, on a different computer (but same project), I am getting the following error:

module.js:550
    throw err;
    ^
Error: Cannot find module '/app/node_modules/webpack/bin/webpack.js'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

I have webpack and webpack-cli in my package.json file.

Also this error was not appearing as of a couple days ago (before project wouldn’t update). Haven’t installed any new dependencies since, have only been working within the React code. So I don’t know where this came from.

My project is https://twili.glitch.me/

Any idea how I can resolve this?

1 Like

Hey @scottlieber,

Can you try running enable-pnpm in the console. It should work.

2 Likes

YES, WORKED. Thank you!!

1 Like

Hey @scottlieber,

Do you mind thanking me in your project and marking this as solved? It would mean a lot to me :grinning:

1 Like

Done! Thanks again!!

2 Likes