I'm trying to implement the plop.js micro framework, but the setGenerator method is always unresolved. I've executed following commands
npm install --save-dev plop
npm install -g plop
I also enabled Coding assistance for Node.js in Webstorm (v2019 3.3), still the methods are inaccessible
module.exports = function(plop) {
plop.setGenerator('component', {
description: 'Create a component',
prompts: [
{
type: 'input',
name: 'name',
message: 'What is your component name?'
},
],
actions: [
{
type: 'add',
path: 'src/scenes/screens/{{camelCase name}}/index.js',
templateFile: 'src/services/dev/plop-templates/index.js.hbs',
}
]
});
};
This file is located in the root of my project like suggested inside the documentation.
Is there any other way to access it from the node_modules?