尽管已安装,但未找到 Pusher 模块

Pusher module is not found although installed

收到以下错误:

Error: Cannot find module 'Pusher'
Require stack:
- /home/ec2-user/realtime_map/node_modules/require-stack/src/index.js
- /home/ec2-user/realtime_map/node_modules/require-stack/index.js
- /home/ec2-user/realtime_map/node_modules/@adonisjs/fold/src/Ioc/index.js
- /home/ec2-user/realtime_map/node_modules/@adonisjs/fold/index.js
- /home/ec2-user/realtime_map/server.js

at /home/ec2-user/realtime_map/start/events.js(anonymous):3
1      //events.js
2
3      const Pusher = use('Pusher')
4      const Event = use('Event');
5      const Env = use('Env');
6
7      // set up Pusher
8      let pusher = new Pusher({

1 requireStack
  /home/ec2-user/realtime_map/node_modules/require-stack/src/index.js:44

2 Ioc._require
  /home/ec2-user/realtime_map/node_modules/@adonisjs/fold/src/Ioc/index.js:345

3 Ioc.use
  /home/ec2-user/realtime_map/node_modules/@adonisjs/fold/src/Ioc/index.js:742

Application crashed, make sure to kill all related running process, fix the issue and re-run the app

pusher 的安装版本是;

adonis-fullstack-app@4.1.0 /home/ec2-user/realtime_map └── pusher@3.0.0

adonis-fullstack-app@4.1.0 /home/ec2-user/realtime_map └── adonis-pusher@1.0.4

您的错误表明无法找到模块名称 Pusher,但正在安装您的安装说明 pusher。 您可以在导入时尝试小写 p:

const Pusher = use('pusher')