Skip to content

npm init -y won't work on default .node-red folder #13

@Noddegamrah

Description

@Noddegamrah

When trying to commit, node-red-contrib-git-ui/git/git-ui/git-ui.js will delete the package.json file (line 14) and run "npm init -y" (line 23) taking all the default values.

Running on a Raspberry Pi, for example, the default node-red home folder is /home/pi/.node-red/ and the name value in this case is ".node-red", returning an exception and making it impossible to commit from the default folder because of the dot included in the name.

You end up without package.json file(!) and unable to commit any changes.

Maybe the package.json file should be backed up and restored if "npm init -y" fails. And maybe the package.json file should be generated in a different way to avoid issues since "npm init" will not accept any configuration parameters ----> npm init [-f|--force|-y|--yes]

screen shot 2017-08-11 at 08 57 03

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions