gpt4 book ai didi

javascript - 无法读取 Angular 移动设备中未定义的属性 'makeCurrent'

转载 作者:数据小太阳 更新时间:2023-10-29 06:00:34 24 4
gpt4 key购买 nike

我已经按照angular移动了,https://github.com/angular/mobile-toolkit/blob/master/guides/cli-setup.md

节点版本v4.4.3NPM 版本 2.15.1

问题是当我键入 $ ng serve 时遇到以下错误。

Cannot read property 'makeCurrent' of undefined
TypeError: Cannot read property 'makeCurrent' of undefined
at Object.<anonymous> (/Users/user/Documents/Projects/PWA/hello-mobile/node_modules/angular2-universal/dist/node/node.js:7:35)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/user/Documents/Projects/PWA/hello-mobile/node_modules/angular2-universal/dist/node/index.js:5:17)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/user/Documents/Projects/PWA/hello-mobile/node_modules/angular2-broccoli-prerender/dist/prerender.js:8:28)
at Module._compile (module.js:409:26)

最佳答案

好的,终于成功了。像下面这样更新根文件夹中的 package.json

"angular2-broccoli-prerender": "0.11.3",
"angular2-universal": "0.104.4",

另加

"child-process-promise": "^2.0.2",
"optimist": "^0.6.1"

然后

> npm update

这将使它再次工作

关于javascript - 无法读取 Angular 移动设备中未定义的属性 'makeCurrent',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38195887/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com