[英]What does “Module {path}\src\app\sales\models\index.ts has no static exports” mean and how do I fix it?
We've just added webpack 3.0.0 to our angular 2 project. 我们刚刚将webpack 3.0.0添加到了angular 2项目中。 I had it working, got about a 20-25% performance improvement and a 50% (ish) decrease in size.
我有它的工作,性能提高了20-25%,尺寸减少了50%(ish)。 I then rebased this onto the main branch and started to get the error.
然后我将其重新定位到主分支上并开始得到错误。
ERROR in chunk main [initial]
[name].bundle.js
Module \src\app\sales\models\index.ts has no static exports true
What does that error actually mean? 这个错误究竟意味着什么? I haven't been able to find anything useful online.
我在网上找不到任何有用的东西。 Any tips on fixing it?
修理它的任何提示?
The \\src\\app\\sales\\models\\index.ts
file hasn't changed since my commit and only contains: 自我提交以来,
\\src\\app\\sales\\models\\index.ts
文件没有更改,只包含:
export * from './app-state';
export * from './purchase.model';
export * from './base.model';
export * from './view-state.model';
export * from './address';
export * from './core';
export * from './cover';
export * from './disclaimers';
export * from './family';
export * from './premium';
export * from './payments';
export * from './policy';
export * from './tracking.model';
After undoing my initial rebase I rebased the main on branch on top of my work and then found the commit that "broke" webpack (thank goodness for git bisect
) and I'm in the process of slowly walking the changes back in to see if I can keep it working. 解开我最初的底垫后,我重订基期的主要分支对我的工作的顶部,然后发现触犯该“爆发”的WebPack(用于谢天谢地
git bisect
),我在慢慢往回走在变化,看看过程我可以继续工作。
Looking at the webpack source the error is being thrown ConcatenatedModule.js in HarmonyImportSpecifierDependencyConcatenatedTemplate
查看webpack源错误正在
HarmonyImportSpecifierDependencyConcatenatedTemplate
中抛出ConcatenatedModule.js
if(!Array.isArray(module.providedExports))
throw new Error(`Module ${module.resource} has no static exports ${module.providedExports}`);
Some poking around has shown that module.providedExports
is a boolean with a value of true
, hence the error; 一些讨论表明
module.providedExports
是一个值为true
的布尔值,因此错误; however, I've not been able to workout what sets that value. 但是,我无法锻炼那些设定价值的东西。
What does the error mean? 错误是什么意思? Other debugging tips?
其他调试技巧?
I have this problem too. 我也有这个问题。 I don't know why this error is throws but i have fix it in replace '*' by explicit export.
我不知道为什么会抛出这个错误,但是我已经通过显式导出替换'*'来修复它。
for example : 例如 :
before : 之前:
export * from './foo';
export * from './bar';
after : 之后:
export {Foo1, Foo2, /*...*/} from './foo';
export {Bar1, Bar2, /*...*/} from './bar'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.