flatiron / prompt

a beautiful command-line prompt for node.js

Home Page:http://github.com/flatiron/prompt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prompt: nickname: (node:17506) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency

KR1470R opened this issue · comments

I'm installed prompt, imported this in my main file js, and get this warning. How fix that?

Source of main file:

const prompt = require("prompt")
prompt.start()
prompt.get("nickname",function(err,res){
	if (err) return onErr(err);
	console.log("Enter your nickname: ")
	console.log(res.nickname)
})

function onErr(err) {
    console.log(err);
    return 1;
}

I have the same issue. How can we fix this?

Idk, i just used readline.

I think this might be a dupe of #199

Similarly to KR1670R, I just opted to use Inquirer instead

It should be already fixed few years ago: 6ebf54a

But it's not published to npm registry. 1.0.0 is the latest version there published 5 years ago!