小编Lah*_*hey的帖子

在编译时,Typescript加载程序会抛出多个"重复标识符.."错误

我今天将一个项目从我的工作站移到我的家用电脑,现在我再也无法编译了.

每当我运行'webpack'时,我都会收到以下错误:

TS2300: Duplicate identifier 'Request'.

ERROR in [at-loader] C:\Users\Rat King Cole\AppData\Roaming\npm\node_modules\typescript\lib\lib.dom.d.ts:9360:13
    TS2300: Duplicate identifier 'Request'.

ERROR in [at-loader] C:\Users\Rat King Cole\AppData\Roaming\npm\node_modules\typescript\lib\lib.dom.d.ts:9365:11
    TS2300: Duplicate identifier 'Response'.

ERROR in [at-loader] C:\Users\Rat King Cole\AppData\Roaming\npm\node_modules\typescript\lib\lib.dom.d.ts:9376:13
    TS2300: Duplicate identifier 'Response'.

ERROR in [at-loader] C:\Users\Rat King Cole\AppData\Roaming\npm\node_modules\typescript\lib\lib.dom.d.ts:14893:18
    TS2451: Cannot redeclare block-scoped variable 'fetch'.

ERROR in [at-loader] C:\Users\Rat King Cole\AppData\Roaming\npm\node_modules\typescript\lib\lib.dom.d.ts:14898:6
    TS2300: Duplicate identifier 'BodyInit'.

ERROR in [at-loader] C:\Users\Rat King Cole\AppData\Roaming\npm\node_modules\typescript\lib\lib.dom.d.ts:14919:6
    TS2300: Duplicate identifier 'HeadersInit'.

ERROR in [at-loader] C:\Users\Rat King Cole\AppData\Roaming\npm\node_modules\typescript\lib\lib.dom.d.ts:14929:6
    TS2300: Duplicate identifier 'RequestInfo'.

ERROR in …
Run Code Online (Sandbox Code Playgroud)

typescript webpack visual-studio-code

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

修复 Material-UI@next (v1.0.0-beta.8) 中的表头和高度

在 Material-UI@v0.xx.x 中有表格高度和固定表格标题的道具,但不幸的是它们似乎没有在 Material-UI@next 中实现。是否有解决方法可以使用 Material-UI@next 实现相同的目的?

我尝试切换到 v0.19.1 并使用该版本重建我的表组件,但这给我留下了一个关于多选 ( https://github.com/callemall/material-ui/issues/5964 )的新错误。

关于如何解决这些问题的任何建议?

reactjs material-ui

8
推荐指数
2
解决办法
1万
查看次数

EF - Navigation属性为null,即使在重新加载实体后也是如此,但在重新启动程序时仍然有效

编辑

我做了一些测试并发现,Item导航属性仅在处理上下文/创建新上下文时才有效.

        DataContext context = new DataContext();
        Order ord = context.Orders.FirstOrDefault();
        ord.OrderItem.Add(new OrderItem() { ItemId = 8, Quantity = 2, DateCreated = DateTime.Now });
        // At this point, both Order and Item navigation property of the OrderItem are null

        context.SaveChanges();
        // After saving the changes, the Order navigation property of the OrderItem is no longer null, but points to the order. However, the Item navigation property is still null.

        ord = context.Orders.FirstOrDefault();
        // After retrieving the order from the context …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework nullreferenceexception ef-model-first

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