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

Generated files for custom messages have duplicate entries #26

Open
jmachuca77 opened this issue Apr 17, 2020 · 2 comments
Open

Generated files for custom messages have duplicate entries #26

jmachuca77 opened this issue Apr 17, 2020 · 2 comments

Comments

@jmachuca77
Copy link

When trying to import some custom messages I get an error:

my_node.js: Identifier 'my_custom_message' has already been declared

when checking the generated files in my_ws/devel/share/gennodejs/ros I see the files are generated for my node, but they have duplicated entries in _index.js

"use strict";

let my_custom_message1 = require('./my_custom_message1.js');
let my_custom_message2 = require('./my_custom_message2.js');
let my_custom_message1 = require('./my_custom_message1.js');
let my_custom_message2 = require('./my_custom_message2.js');

module.exports = {
  my_custom_message1: my_custom_message1,
  my_custom_message2: my_custom_message2,
  my_custom_message1: my_custom_message1,
  my_custom_message2: my_custom_message2,
};

Any idea what could be causing this? Manually removing the duplicates fixes the issue but I would rather not have to do this every time I do a build.

Originally posted in RethinkRobotics-opensource/rosnodejs#146

@chris-smith
Copy link
Collaborator

Any chance you can put your workspace on GitHub somewhere?

@jmachuca77
Copy link
Author

Hi, Sorry for the late response, unfortunately no, this is a private development. Im not sure how to debug this.. maybe I can build a package with a similar structure and see if the issues show up there too.

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