小编Wik*_*awa的帖子

无法正式安装“无法读取未定义的属性‘种类’”

这个问题可能看起来很愚蠢,但就像两周前一样,我安装它没有任何问题。现在看起来是这样的: 正式安装

ng 添加@ngx-formly/schematics --ui-theme=material

我尝试在材料和 cdk 模块之后/之前安装它,但结果是相同的。我还尝试安装所有单独的正式模块(基于我之前创建的项目),但出现此错误:

The package that you are trying to add does not support schematics. You can try using a different version of the package or contact the package author to add ng-add support.
Run Code Online (Sandbox Code Playgroud)

我还尝试删除节点模块和yarn.lock并再次初始化它,但仍然不起作用。而且当我创建表单时它也不会显示。我也尝试用yarn add ...或-ui-theme=bootstrap来安装它,但结果是一样的。在安装之前也尝试过服务(在堆栈上的某个地方读取它),但它也不起作用。

我听说节点 v.15.6.0 有一些问题,但我不确定是否是这样。这也是我的版本:

Angular CLI 版本

纱线版本是 1.22.5

更新:我尝试使用纱线升级--最新升级所有软件包,然后再次正式安装。之后:

 ng add @ngx-formly/schematics --ui-theme=material
Run Code Online (Sandbox Code Playgroud)

我明白了:

An unhandled exception occurred: Cannot find module '@schematics/angular/utility/config'
Require stack:
- /home/wiktor/angular-material-template/node_modules/@ngx-formly/schematics/utils/ast.js
- /home/wiktor/angular-material-template/node_modules/@ngx-formly/schematics/src/ng-add/index.js
- /home/wiktor/angular-material-template/node_modules/@angular-devkit/schematics/tools/export-ref.js
- /home/wiktor/angular-material-template/node_modules/@angular-devkit/schematics/tools/index.js
- /home/wiktor/angular-material-template/node_modules/@angular/cli/utilities/json-schema.js
- /home/wiktor/angular-material-template/node_modules/@angular/cli/models/command-runner.js
- /home/wiktor/angular-material-template/node_modules/@angular/cli/lib/cli/index.js
- /usr/lib/node_modules/@angular/cli/lib/init.js
- /usr/lib/node_modules/@angular/cli/bin/ng …
Run Code Online (Sandbox Code Playgroud)

node.js node-modules angular-formly yarnpkg angular

5
推荐指数
1
解决办法
718
查看次数

Julia 中使用结构数据类型、指针和 this 的树和图问题

我想用 Julia 语言编写解决一些图/树问题。这是一些很好的例子。在C中是这样完成的:
Recursive C program for level order traversal of Binary Tree

#include <stdio.h>
#include <stdlib.h>

/* A binary tree node has data, pointer to left child
   and a pointer to right child */
struct node
{
    int data;
    struct node *left, *right;
};

/* Function prototypes */
void printGivenLevel(struct node* root, int level);
int height(struct node* node);
struct node* newNode(int data);

/* Function to print level order traversal a tree*/
void printLevelOrder(struct node* root)
{
    int h = …
Run Code Online (Sandbox Code Playgroud)

algorithm struct graph-algorithm data-structures julia

1
推荐指数
1
解决办法
790
查看次数