The solution to the failure to install the module using the npm password

For example: use npm install mysql to install the database module, the
installation fails, and an error is reported Error: Cannot find module 'mysql'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25 )
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (F:\nodeJS\app\mysql\mysql1.js:1:80 )
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module. js:446:12)
    at Function.Module._load (module.js:438:3) Enter F:\nodeJS in the installation directory as follows C:\Users\1>cd F:\nodeJS F:\nodeJS> npm install mysql was successfully installed using this command







The output is as follows
F:\nodeJS>npm install mysql
[email protected] F:\nodeJS\node_modules\npm
`-- [email protected]
  +-- [email protected]
  +-- [email protected]. 14
  | +-- [email protected]
  | +-- [email protected]
  | `-- [email protected]
  `-- [email protected] Check

whether mysql is installed successfully
Command line: npm list mysql
outputs [email protected] version, that is, the installation is successful

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326667042&siteId=291194637