错误:无法解析setupPlatform的所有参数:(?,[对象对象],[对象对象]) [英] Error: Can't resolve all parameters for setupPlatform: (?, [object Object], [object Object])
问题描述
我将Angular更新到了版本8,但遇到了一个小问题.当我通过离子服务启动应用程序
I updated my Angular to version 8, and I have run into a small problem. when I start the app with ionic serve
Error: Can't resolve all parameters for setupPlatform: (?, [object
Object], [object Object]).
at syntaxError (http://localhost:8100/build/vendor.js:177346:17)
at CompileMetadataResolver._getDependenciesMetadata
(http://localhost:8100/build/vendor.js:196072:35)
at CompileMetadataResolver._getFactoryMetadata
(http://localhost:8100/build/vendor.js:195972:51)
at CompileMetadataResolver.getProviderMetadata
(http://localhost:8100/build/vendor.js:196204:43)
at http://localhost:8100/build/vendor.js:196134:49
at Array.forEach (<anonymous>)
at CompileMetadataResolver._getProvidersMetadata
(http://localhost:8100/build/vendor.js:196094:19)
at http://localhost:8100/build/vendor.js:195717:119
at Array.forEach (<anonymous>)
at CompileMetadataResolver.getNgModuleMetadata
(http://localhost:8100/build/vendor.js:195708:49)
我试图回滚到旧版本,仍然遇到相同的问题.我有另一个离子应用程序,它可以与我的配置一起使用.
I have tried to rollback to an older version, still get the same problem. I have another ionic app and it works with the config I have.
配置为:
Ionic:
Ionic CLI : 5.2.1
Ionic Framework : ionic-angular 3.9.6
@ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 6.5.0
Cordova Platforms : android 6.1.2, browser 4.1.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 16 other plugins)
Utility:
cordova-res : 0.5.1
native-run : 0.2.7
System:
NodeJS : v10.15.1 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Angular CLI: 7.3.0
Node: 10.15.1
OS: darwin x64
Angular: 8.0.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.0 (cli-only)
@angular-devkit/build-optimizer 0.0.35
@angular-devkit/core 7.3.0 (cli-only)
@angular-devkit/schematics 7.3.0 (cli-only)
@angular/fire 5.2.1
@angular/http 7.2.15
@schematics/angular 7.3.0 (cli-only)
@schematics/update 0.13.0 (cli-only)
rxjs 6.5.2
typescript 3.5.2
webpack 3.12.0
我不知道是什么setupPlatform,它不在我编写的代码中.我认为这是某些插件的一部分,我使用VS Code进行了搜索-在setupPlatform上没有找到匹配项.我有点卡住,在寻找解决方案的搜索中,我没有发现任何人遇到类似的问题.在这方面需要一些帮助.
I have no idea what setupPlatform, it's not in the code i written. I assume is part of some add on plugin, I did a search using VS Code - did not get a match on setupPlatform. I'm a bit stuck and in my searches to find a solution, I have not found anyone had a similar issue. Need some help on this one.
谢谢.
推荐答案
我收到了相同的错误消息.我在Chrome开发人员工具中使用了Inspect来跟踪它在NgModules中运行时在"PLTCONFIG"上出现hasunknowdependency = true错误.缺少的参数是setupPlatform()的"doc"参数.然后,我跟踪到不再从此处引用的平台浏览器问题导出的文档":
I was receiving the same error message. I used Inspect with Chrome Developer Tools to track it to a hasunknowdependency = true error on "PLTCONFIG" as it runs through the NgModules. The missing parameter is the "doc" parameter of setupPlatform(). I then tracked that to the "DOCUMENT" no longer exported from platform-browser issue referenced here: "export 'DOCUMENT' was not found in '@angular/platform-browser'. After I made the changes the error disappeared. I hope this helps.
这篇关于错误:无法解析setupPlatform的所有参数:(?,[对象对象],[对象对象])的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!