Home > Back-end >  node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module 'side-channel'
node:internal/modules/cjs/loader:936 throw err; ^ Error: Cannot find module 'side-channel'

Time:10-05

I encountered this error when I run npm start to view my react app.

> react-scripts start

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'side-channel'
Require stack:
- C:\Users\USER-PC\Documents\Projects\frontend\Info_site\node_modules\qs\lib\stringify.js
- C:\Users\USER-PC\Documents\Projects\frontend\Info_site\node_modules\qs\lib\index.js
- C:\Users\USER-PC\Documents\Projects\frontend\Info_site\node_modules\webpack-dev-server\node_modules\express\lib\middleware\query.js
- C:\Users\USER-PC\Documents\Projects\frontend\Info_site\node_modules\webpack-dev-server\node_modules\express\lib\application.js
- C:\Users\USER-PC\Documents\Projects\frontend\Info_site\node_modules\webpack-dev-server\node_modules\express\lib\express.js
- C:\Users\USER-PC\Documents\Projects\frontend\Info_site\node_modules\webpack-dev-server\node_modules\express\index.js
- C:\Users\USER-PC\Documents\Projects\frontend\Info_site\node_modules\webpack-dev-server\lib\Server.js       
- C:\Users\USER-PC\Documents\Projects\frontend\Info_site\node_modules\react-scripts\scripts\start.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\USER-PC\Documents\Projects\frontend\Info_site\node_modules\qs\lib\stringify.js:3:22)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\USER-PC\\Documents\\Projects\\frontend\\Info_site\\node_modules\\qs\\lib\\stringify.js',     
    'C:\\Users\\USER-PC\\Documents\\Projects\\frontend\\Info_site\\node_modules\\qs\\lib\\index.js',
    'C:\\Users\\USER-PC\\Documents\\Projects\\frontend\\Info_site\\node_modules\\webpack-dev-server\\node_modules\\express\\lib\\middleware\\query.js',
    'C:\\Users\\USER-PC\\Documents\\Projects\\frontend\\Info_site\\node_modules\\webpack-dev-server\\node_modules\\express\\lib\\application.js',
ules\\express\\lib\\application.js',
    'C:\\Users\\USER-PC\\Documents\\Projects\\frontend\\Info_site\\node_modules\\webpack-dev-server\\node_modules\\express\\lib\\express.js',
    'C:\\Users\\USER-PC\\Documents\\Projects\\frontend\\Info_site\\node_modules\\webpack-dev-server\\node_modules\\express\\lib\\express.js',
    'C:\\Users\\USER-PC\\Documents\\Projects\\frontend\\Info_site\\node_modules\\webpack-dev-server\\node_modules\\express\\index.js',
    'C:\\Users\\USER-PC\\Documents\\Projects\\frontend\\Info_site\\node_modules\\webpack-dev-server\\lib\\Server.js',
    'C:\\Users\\USER-PC\\Documents\\Projects\\frontend\\Info_site\\node_modules\\react-scripts\\scripts\\start.js'
  ]
}

And then I tried to install the module with this command:

npm i side-channel

I still got an error:


npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\USER-PC\AppData\Local\npm-cache\_logs\2022-10-04T15_30_26_716Z-debug-0.log

What could possibly be the problem? I ran the start command just after installing the dependencies with 'npm install' command.

CodePudding user response:

You can try removing node_modules and reinstalling all modules with npm install

CodePudding user response:

It worked now. I had to delete the yarn.lock in my project, after deleting the node_modules file, then I ran the command again: npm install

  • Related