Cannot find module node internal modules cjs loader:936

❯ npm run callback

[email protected] callback node src/callback/index.js

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

Error: Cannot find module '/home/milo2003/personalProjects/AsyncJS/src/callback/index.js' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []

Upvotes: 0

Views: 3262

Answers (1)

akanksha_84
akanksha_84

Reputation: 1

Install node version manager (nvm) before installing npm. In my case, Nodejs was downloaded easily but npm was not getting installed. After updating environment variable and system variable still its was showing cannot find module node internal module cjs loader: 936 when I tried installing npm (through npm install command). I've checked through Youtube but couldn't resolve. Then checked this doc : https://docs.npmjs.com/downloading-and-installing-node-js-and-npm

I got to know that to resolve my prob I should first install NVM(node version manager). https://github.com/nvm-sh/nvm

Upvotes: 0

Related Questions