自今年年初以来,我们的项目就停止了工作。我已经尽可能地更新了npm(某些软件包依赖项使我无法采用最新版本)。
我可以进行《离子服务》,我所有的单元测试都有效。
当我单击导航到应用程序中的另一个页面时,出现以下错误:
Runtime Error
Uncaught (in promise): TypeError: Array.prototype.map callback must be a function map@[native code] webpackAsyncContext@http://localhost:8100/build/main.js:495:37 loadAndCompile@http://localhost:8100/build/vendor.js:94558:36
load@http://localhost:8100/build/vendor.js:65223:48 getNavLinkComponent@http://localhost:8100/build/vendor.js:25499:43 getComponent@http://localhost:8100/build/vendor.js:38629:43 convertToViews@http://localhost:8100/build/vendor.js:38657:45 _loadLazyLoading@http://localhost:8100/build/vendor.js:55446:93 onInvoke@http://localhost:8100/build/vendor.js:5086:39 run@http://localhost:8100/build/polyfills.js:3:10149 http://localhost:8100/build/polyfills.js:3:20245 onInvokeTask@http://localhost:8100/build/vendor.js:5077:43 runTask@http://localhost:8100/build/polyfills.js:3:10844 o@http://localhost:8100/build/polyfills.js:3:7901 invokeTask@http://localhost:8100/build/polyfills.js:3:16824 p@http://localhost:8100/build/polyfills.js:2:27654 v@http://localhost:8100/build/polyfills.js:2:27894
Stack
c@http://localhost:8100/build/polyfills.js:3:19761
http://localhost:8100/build/polyfills.js:3:19175
_fireError@http://localhost:8100/build/vendor.js:55367:22
_failed@http://localhost:8100/build/vendor.js:55360:24
onInvoke@http://localhost:8100/build/vendor.js:5086:39
run@http://localhost:8100/build/polyfills.js:3:10149
http://localhost:8100/build/polyfills.js:3:20245
onInvokeTask@http://localhost:8100/build/vendor.js:5077:43
runTask@http://localhost:8100/build/polyfills.js:3:10844
o@http://localhost:8100/build/polyfills.js:3:7901
invokeTask@http://localhost:8100/build/polyfills.js:3:16824
p@http://localhost:8100/build/polyfills.js:2:27654
v@http://localhost:8100/build/polyfills.js:2:27894
离子信息
Ionic Framework: 3.9.2
Ionic App Scripts: 3.2.1
Angular Core: 5.2.10
Angular Compiler CLI: 5.2.10
Node: 11.6.0
OS Platform: macOS High Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15
看着堆栈,我没有看到任何个人代码,我不确定从哪里开始寻找。
看完main.js
/***/ 219:
/***/ (function(module, exports, __webpack_require__) {
var map = {
"../pages/clients/clients.module": [
220
],
......
"../pages/rapports/rapports.module": [
270
]
};
function webpackAsyncContext(req) {
var ids = map[req];
if(!ids)
return Promise.reject(new Error("Cannot find module '" + req + "'."));
main.js:495:37: return Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {
return __webpack_require__(ids[0]);
});
};
webpackAsyncContext.keys = function webpackAsyncContextKeys() {
return Object.keys(map);
};
webpackAsyncContext.id = 219;
module.exports = webpackAsyncContext;
/***/ }),
我在有问题的行的开头添加了“ main.js:495:37»。除了map的值之外,其余的似乎是由Web pack生成的代码。