[英]Angular 2 with Polymer failed ng serve
after I configured my application I have this error at start: "Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plugins options." 配置完应用程序后,开始时会出现此错误:“试图找到引导程序代码,但找不到。指定可静态分析的引导程序代码或将entryModule传递给插件选项。” I could not find one good solution for solving this.
我找不到解决这个问题的好方法。 From what I understood it s seems to be a problem with a new file I made module-polymer.ts, somehow fails to parse the bootstrap.
据我了解,我制作的module-polymer.ts文件似乎存在问题,但无法解析引导程序。
Any solution guys? 有解决方案的人吗?
I desperately need help on this one. 我迫切需要这一方面的帮助。
Check your ng version "ng -v" It should look something like this: 检查您的ng版本“ ng -v”它应该看起来像这样:
angular-cli:1.0.0-beta.(your version) angular-cli:1.0.0-beta。(您的版本)
node: version 节点:版本
os: newer mind 操作系统:较新的想法
Than open package.json and shed your devDependencies angular-cli version. 比打开package.json并放弃了devDependencies angular-cli版本。 Is there a difference?
有区别吗? Set version from ng -v command.
通过ng -v命令设置版本。
And last. 最后。 Delete node_modules, than set command "npm i", and after it "ng serve".
删除node_modules,然后设置命令“ npm i”,然后设置为“ ng serve”。
Work? 工作?
I finally solved it. 我终于解决了。 It seems to be a problem with the new versions of angular cli.
新版本的cli似乎有问题。 I changed the cli and now I have no problem.
我改变了cli,现在我没有问题了。 right now I downgraded to angular-cli: 1.0.0-beta.19-3
现在我降级到angular-cli:1.0.0-beta.19-3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.