Angular 对象。在named-lazy-chunks-webpack-plugin.js中生成类型错误:未定义的类扩展值不是函数或null
我不知道为什么在运行ng serve时会出现此错误Angular 对象。在named-lazy-chunks-webpack-plugin.js中生成类型错误:未定义的类扩展值不是函数或null,angular,Angular,我不知道为什么在运行ng serve时会出现此错误 > Class extends value undefined is not a function or null > TypeError: Class extends value undefined is not a function or null > at Object.<anonymous> (/Users/IdeaProjects/Test/Frontend/node_mo
> Class extends value undefined is not a function or null
> TypeError: Class extends value undefined is not a function or null
> at Object.<anonymous> (/Users/IdeaProjects/Test/Frontend/node_modules/@angular/cli/plugins/named-lazy-chunks-webpack-plugin.js:9:51)
> at Module._compile (module.js:570:32)
> at Object.Module._extensions..js (module.js:579:10)
> at Module.load (module.js:487:32)
> at tryModuleLoad (module.js:446:12)
> at Function.Module._load (module.js:438:3)
> at Module.require (module.js:497:17)
> at require (internal/module.js:20:19)
> at Object.<anonymous> (/Users/IdeaProjects/Test/Frontend/node_modules/@angular/cli/models/webpack-configs/common.js:6:44)
> at Module._compile (module.js:570:32)
> at Object.Module._extensions..js (module.js:579:10)
> at Module.load (module.js:487:32)
> at tryModuleLoad (module.js:446:12)
> at Function.Module._load (module.js:438:3)
> at Module.require (module.js:497:17)
> at require (internal/module.js:20:19)
有人能帮我吗非常感谢我发现了问题所在,我只需要安装webpack插件
npm安装提取文本网页包插件-保存OI!你刚刚删除了一个我正在回答的问题,我投入了很多的努力。给你 原始问题:java中的cat跳跃长度 我对编码还是新手,所以我遇到了很多麻烦,你能帮我吗 请帮助我完成这个简单的代码。这个问题围绕着猫的眼睛 跳跃,每次猫跳跃,跳跃的长度都会增加一倍。但是 最大跳跃长度为4。路径方法显示完成的跳跃 靠猫 {这里有示例代码} 如果你要问猫它的路径cat.path,那么猫当然需要知道它的路径。事实上,你那只可怜的猫不停地蹦蹦来蹦去,忘了它去了哪里。你的猫需要的是一块土地 现在有很多方法可以做到这一点,但我认为这是最容易理解的方法。有两件事你的猫需要知道,它的路径和它最后跳了多远
public class Cat()
{
private string leapPath;
private string lastLeapLength;
}
我从第一次测试中注意到,路径应该以单个*开始,因此让我们在中设置它,以及设置最后一次跳跃
public class Cat() {
private string leapPath;
private string lastLeapLength;
public Cat() {
leapPath = "*";
lastLeapLength = 0;
}
}
太棒了,现在你的猫聪明了一点!现在它需要学习如何跳跃,但与你的老的健忘猫不同,这只新的和改进的智能猫©需要记住它在哪里
public class Cat() {
...
public void leap() {
int leapLength = lastLeapLength;
if(leapLength < 4) {
leapLength++;
lastLeapLength = leapLength; // the cat remembers how far it leaped
}
// the cat figures out where he leaped to
for(int i = 0; i < leapLength; i++) {
leapPath = leapPath + ".";
}
leapPath = leapPath + "*";
}
}
同样,有很多不同的方法来解决这个问题。事实上,猫只需要知道它跳了多少次,然后当有人问它时,它就能知道自己的路线。我鼓励您不要只接受这个答案,而是实施一个不同的解决方案
Stackoverflow并不是一个教程站点,它实际上是用来询问特定问题的。有很多很棒的网站可以学习如何编写代码,虽然它们不会为您回答特定的问题,但它们会教您自己解决问题所需的基础知识。无论如何,这总是更有趣的
祝你好运,不要灰心
public class Cat() {
...
public string path() {
return leapPath;
}
}