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

Seneca REPL produces an error on startup #55

Open
ashleydavis opened this issue May 23, 2024 · 0 comments
Open

Seneca REPL produces an error on startup #55

ashleydavis opened this issue May 23, 2024 · 0 comments

Comments

@ashleydavis
Copy link

ashleydavis commented May 23, 2024

I'm looking to use the Seneca REPL to inspect, query and help debug Seneca instances.

Except I haven't been able to get it workng.

I followed the usage guide and produced an example that looks as follows.

package.json:

{
  "name": "broken-seneca-repl",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "@seneca/repl": "^9.0.1",
    "seneca": "^3.36.0"
  }
}

index.js:

var Seneca = require('seneca');

var seneca = Seneca()
    .use('repl');

You can find the full example code here:
https://github.com/ashleydavis/broken-seneca-repl

Starting the project using node index.js or npm start yields the following error:

{
    "kind": "fatal",
    "level": 600,
    "plugin": "seneca",
    "tag": "3.36.0",
    "id": "y2ywktc9ha0k/1716500788417/83200/3.36.0/-",
    "code": "plugin_define_failed",
    "notice": "seneca: The definition action for the plugin repl has failed: seneca.message is not a function (    at Seneca.repl (c:\\projects\\broken-seneca-repl\\node_modules\\@seneca\\repl\\dist\\repl.js:35:12). This error is considered fatal as all plugins have to initialize correctly. You should test the plugin by itself to verify that it is working correctly. Also ensure that the configuration options passed to the plugin are correct. These are shown below under in the DETAILS section. There could also be a bug in the plugin. If you think that is the case, please create a github issue on the plugin's repository, and include this error report.",
    "err": {
        "eraro": true,
        "orig": {},
        "code": "plugin_define_failed",
        "seneca": true,
        "package": "seneca",
        "msg": "seneca: The definition action for the plugin repl has failed: seneca.message is not a function (    at Seneca.repl (c:\\projects\\broken-seneca-repl\\node_modules\\@seneca\\repl\\dist\\repl.js:35:12). This error is considered fatal as all plugins have to initialize correctly. You should test the plugin by itself to verify that it is working correctly. Also ensure that the configuration options passed to the plugin are correct. These are shown below under in the DETAILS section. There could also be a bug in the plugin. If you think that is the case, please create a github issue on the plugin's repository, and include this error report.",
        "details": {
            "fullname": "repl",
            "message": "seneca.message is not a function (    at Seneca.repl (c:\\projects\\broken-seneca-repl\\node_modules\\@seneca\\repl\\dist\\repl.js:35:12)",
            "options": {
                "listen": true,
                "port": 30303,
                "host": "127.0.0.1",
                "depth": 11,
                "alias": {
                    "$": {
                        "v$": "7.0.0"
                    },
                    "t": "object",
                    "v": {
                        "stats": "seneca.stats()",
                        "stats full": "seneca.stats({summary:false})",
                        "stats/full": "seneca.stats({summary:false})"
                    },
                    "n": 3,
                    "c": {
                        "$": {
                            "v$": "7.0.0"
                        },
                        "t": "any",
                        "n": 0,
                        "r": false,
                        "p": false,
                        "d": -1,
                        "k": [],
                        "e": true,
                        "u": {},
                        "a": [],
                        "b": [],
                        "m": {}
                    },
                    "r": false,
                    "p": false,
                    "d": -1,
                    "k": [],
                    "e": true,
                    "u": {},
                    "a": [],
                    "b": [],
                    "m": {}
                },
                "inspect": {
                    "$": {
                        "v$": "7.0.0"
                    },
                    "t": "object",
                    "v": {},
                    "n": 0,
                    "c": {
                        "$": {
                            "v$": "7.0.0"
                        },
                        "t": "any",
                        "n": 0,
                        "r": false,
                        "p": false,
                        "d": -1,
                        "k": [],
                        "e": true,
                        "u": {},
                        "a": [],
                        "b": [],
                        "m": {}
                    },
                    "r": false,
                    "p": false,
                    "d": -1,
                    "k": [],
                    "e": true,
                    "u": {},
                    "a": [],
                    "b": [],
                    "m": {}
                },
                "cmds": {
                    "$": {
                        "v$": "7.0.0"
                    },
                    "t": "object",
                    "v": {},
                    "n": 0,
                    "c": {
                        "$": {
                            "v$": "7.0.0"
                        },
                        "t": "any",
                        "n": 0,
                        "r": false,
                        "p": false,
                        "d": -1,
                        "k": [],
                        "e": true,
                        "u": {},
                        "a": [],
                        "b": [],
                        "m": {}
                    },
                    "r": false,
                    "p": false,
                    "d": -1,
                    "k": [],
                    "e": true,
                    "u": {},
                    "a": [],
                    "b": [],
                    "m": {}
                }
            },
            "repo": "",
            "errmsg": "seneca.message is not a function",
            "errline": "at Seneca.repl (c:\\projects\\broken-seneca-repl\\node_modules\\@seneca\\repl\\dist\\repl.js:35:12)",
            "orig$": {},
            "message$": "seneca.message is not a function"
        },
        "callpoint": "at Seneca.repl (c:\\projects\\broken-seneca-repl\\node_modules\\@seneca\\repl\\dist\\repl.js:35:12)",
        "plugin": "repl",
        "plugin_callpoint": "at callpoint (c:\\projects\\broken-seneca-repl\\node_modules\\seneca\\lib\\common.js:412:36)",
        "fatal$": true
    },
    "isot": "2024-05-23T21:46:28.672Z",
    "when": 1716500788672,
    "level_name": "fatal",
    "seneca_id": "y2ywktc9ha0k/1716500788417/83200/3.36.0/-"
}

I'm unable to connect seneca-repl to the instance.

Have I done something wrong in the setup?

Or maybe is latest Seneca incompatible with Seneca-repl?

I will appreciate your guidance.

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

1 participant