node-red/node-red-nodegen

invalid module name when multi-byte characters are used as node name

kazuhitoyokoi opened this issue · 0 comments

What are the steps to reproduce?

  1. Use function node on flow editor.
  2. Input Japanese characters to function node name.
  3. Export JavaScript code to file using library function.
  4. Install node generator
    sudo npm install -g git+http://github.com/node-red/node-red-nodegen.git
  5. Generate node using node-red-nodegen command
    node-red-nodegen ~/.node-red/lib/functions/<exported file's name>.js

What happens?

Command outputs success message but the generated module has invalid name, "node-red-contrib-".

What do you expect to happen?

Command shows error, "invalid node name".

Please tell us about your environment:

  • Node-RED version: v0.18.4
  • node.js version: v6.11.3
  • npm version: v3.10.10
  • Platform/OS: Ubuntu 16.04
  • Browser: Google Chrome 63.0.3239.132(Official Build)(64 bit)on Windows 10