Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: msgflo-send-message while executing this command #180

Open
mohandass-pat opened this issue Jul 13, 2019 · 4 comments
Open

Error: msgflo-send-message while executing this command #180

mohandass-pat opened this issue Jul 13, 2019 · 4 comments

Comments

@mohandass-pat
Copy link

mohandass-pat commented Jul 13, 2019

Hi. I just followed the docs(https://msgflo.org/docs/usage/index.html) to setup msgFlo. But I'm getting the below error. i'm using mqtt.

$ msgflo-send-message --queue repeater.IN --json '{ "foo": "bar" }'
internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module '../bin/utils/send'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/home/pat-003/Documents/graph-playground/test-run/node_modules/msgflo/bin/msgflo-send-message:2:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Help me to solve this issue. Thanks in advance :)

@jonnor
Copy link
Member

jonnor commented Jul 13, 2019

What node.js version? Are you using a special node.js loader (I see some cjs references)?

@mohandass-pat
Copy link
Author

Hi. Thanks for the reply. I'm using Node v10.15.2, npm 6.9.0. I'm not using any special loader

@mohandass-pat
Copy link
Author

In npm module, msgflo/bin/mesgflo-send is referring wrong path.

In msgflo-send file,
require('../bin/utils/send').main()
need to be replaced with

require('../lib/utils/send').main()

@jonnor
Copy link
Member

jonnor commented Jul 22, 2019

Ouch, that is a bug. Reopening.

@jonnor jonnor reopened this Jul 22, 2019
d-e-h-i-o added a commit to d-e-h-i-o/msgflo that referenced this issue Jan 19, 2021
msgflo-send-message did not work with this wrong import. See issue msgflo#180 for the bug report.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants