当我 运行 我的 node.js 应用程序(也使用 rabbit )时出现错误
I am getting an error when i run my node.js app ( also using rabbit )
Error: Cannot find module 'amqplib/callback_api'
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> (C:\Users\hello\Downloads\Private-Chat-App-Socket.io-
master\Private-Chat-App-Socket.io-master\app.js:3:9)
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)
我试图通过使用 npm 安装 amqp 来解决错误,但它不起作用,我也在互联网上搜索了解决方案,但没有成功。
Pic of the error
Error: Cannot find module 'amqplib/callback_api'
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> (C:\Users\hello\Downloads\Private-Chat-App-Socket.io-
master\Private-Chat-App-Socket.io-master\app.js:3:9)
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)
我试图通过使用 npm 安装 amqp 来解决错误,但它不起作用,我也在互联网上搜索了解决方案,但没有成功。
Pic of the error