不能读取property '在角度移动中未定义的
Cannot read property 'makeCurrent' of undefined in angular mobile
我已经按照angular mobile做了,https://github.com/angular/mobile-toolkit/blob/master/guides/cli-setup.md
节点版本v4.4.3
NPM版本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)
好了,终于修好了。更新包。在根目录下的Json文件
"angular2-broccoli-prerender": "0.11.3",
"angular2-universal": "0.104.4",
还添加
"child-process-promise": "^2.0.2",
"optimist": "^0.6.1"
然后> npm update
这将使它再次工作
我能够通过更新Aswin提到的两个包来使它工作。
当时最新的/可用的版本是:
"angular2-broccoli-prerender": "0.11.5",
"angular2-universal":"0.104.5",
相关文章:
- 为什么“;未定义的“;在JavaScript中结束循环
- 要求未定义JS回调参数
- 如何检查管道中未定义的项目
- TypeError:无法读取属性'推'未定义的JavaScript
- $window.ga在AngularJS事件中未定义
- 未捕获的TypeError无法读取未定义的属性socialsharing
- 为什么grunt contrib connect的中间件选项的第三个参数是未定义的
- 无法获取属性'selectedIndex'的未定义引用或null引用
- 如何消除代码中的未定义和其他问题
- 未捕获的ReferenceError:$未定义
- this.router在AngularJS 2中未定义
- 未捕获的类型错误:无法读取属性'删除'的未定义
- ChardinJs,Hybrid Cordova移动应用程序-“;未定义的“;不是函数
- 当我按住鼠标按钮移动鼠标时,Fabric.js–元素是未定义的
- 套接字.在Phonegap移动应用程序中未定义的变量
- 当移动到函数(nodejs, express)时,请求和响应对象变得未定义
- Emberjs embercli foundation 5 scrolltop未定义移动响应
- Azure移动服务- table.read().完成(函数(结果))返回未定义的值
- asp.net mvc-在IE11移动浏览器中未定义的Javascript代码,但可在Chrome、Firefox、IE
- 不能读取property '在角度移动中未定义的