i am trying to create a simple Schematics that read all template-files in my "./files/xxx" and copy the parsed ones into my angular app.
I am struggling with the following error:
Error: Could not find (undefined) at Object.getWorkspace (C:\MyProg\Client.Core\node_modules@schematics\angular\utility\config.js:22:15)
export function page(_options: PageSchema): Rule {
return (tree: Tree, _context: SchematicContext) => {
setupOptions(tree, _options);
[...]
return rule(tree, _context);
};
}
export function setupOptions(host: Tree, options: any): Tree {
const workspace = getWorkspace(host);
if (!options.project) {
options.project = Object.keys(workspace.projects)[0];
}
const project = workspace.projects[options.project];
options.path = join(normalize(project.root), 'src');
return host;
}
getWorkspace() is my problem.
Do you have any idea?
Ty in advance.