Closed charliea21 closed 3 years ago
Same here! With node v12.X
I have the same problem, nothing executes after this message.
Same problem running Node v12.13.0.
Same issue, tested using Node v13.8.0, 12.16.1, 10.19.0; on Windows 10, it's get stuck after asking for the generator name.
Having the same issue. Any update?
Same issue here ...
Same issue, Node v12.13.1
Same issue, Node v12.16.2
But I found a solution, need to run yo
manually with the following command:
node --no-deprecation <global_node_modules_path>\npm\node_modules\yo\lib\cli.js <generator or command>
Example for Windows PowerShell:
node --no-deprecation "$env:APPDATA\npm\node_modules\yo\lib\cli.js" generator
Same issue, Node v12.16.2 But I found a solution, need to run
yo
manually with the following command:node --no-deprecation <global_node_modules_path>\npm\node_modules\yo\lib\cli.js <generator or command>
Example for Windows PowerShell:node --no-deprecation "$env:APPDATA\npm\node_modules\yo\lib\cli.js" generator
this doesn't work for me, but I hack it by just commenting the code of askName
:
your npm location/generator-generator/app/index.js
prompting() {
// return askName({
// name: 'name',
// message: 'Your generator name',
// default: makeGeneratorName(path.basename(process.cwd())),
// filter: makeGeneratorName,
// validate: str => {
// return str.length > 'generator-'.length;
// }
// }, this).then(props => {
// this.props.name = props.name;
// });
this.props.name = 'generator-project'
}
I don't have the same error as @charliea21, but i was able to use the same "hack" as @betterRunner already explained, and it worked!!!
if it is useful, i'm running Node v12.16.3
This is the error:
(node:2464) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
I have the same problem . . . Node v12.18.1, npm 6.14.5, Windows 10 Pro 2004.
The solution above presented by @andrey-reznik does not work for me, only deletes the deprecation message and the yo hangs.
I am traying to modify the code . . .
This is a bug in win10 that readline.closed
can cause freeze when readline.createInterface({ terminal: true })
Adding a hook in AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\node_modules\inquirer\lib\ui\baseUI.js
can solve this problem:
var readline = require('readline');
const oldClose = readline.Interface.prototype.close
readline.Interface.prototype.close = function () {
this.terminal = false // set terminal to false before close
oldClose.call(this)
};
Node.js 14.6 has fixed this problem.
same problem
The solution is to first initialize the package.json using:yarn init
When I choose my generator name (or just press ENTER/RETURN for default) for
yo generator
I get a deprecation error then Yeoman stops working...(node:24532) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated