你好,我一直面临着在angular2种子项目中集成vaadin元素的问题。
我有第一个错误:
Error: Error: XHR error (404 Not Found) loading http://localhost:5555/node_modules/@vaadin/package.json(…)我通过在文件project.config.ts中添加代码解决了这个问题:
this.SYSTEM_CONFIG_DEV.paths['@vaadin/angular2-polymer'] =
`${this.APP_BASE}node_modules/@vaadin/angular2-polymer`;
this.SYSTEM_CONFIG_DEV.packageConfigPaths =
this.SYSTEM_CONFIG_DEV.packageConfigPaths.concat([
`${this.APP_BASE}node_modules/@vaadin/*/package.json`
]);
this.SYSTEM_BUILDER_CONFIG.packages['@vaadin/angular2-polymer'] = {
main: 'index.js',
defaultExtension: 'js'
}但现在我的控制台中出现了这个错误:
Error: TypeError: Cannot read property 'prototype' of undefined
at __extends (http://localhost:5555/node_modules/@vaadin/angular2-polymer/src/polymer-element.js:5:68)
at eval (http://localhost:5555/node_modules/@vaadin/angular2-polymer/src/polymer-element.js:12:5)
at Object.eval (http://localhost:5555/node_modules/@vaadin/angular2-polymer/src/polymer-element.js:23:2)
at eval (http://localhost:5555/node_modules/@vaadin/angular2-polymer/src/polymer-element.js:280:4)
at eval (http://localhost:5555/node_modules/@vaadin/angular2-polymer/src/polymer-element.js:281:3)
at eval (<anonymous>)
Evaluating http://localhost:5555/node_modules/@vaadin/angular2-polymer/src/polymer-element.js
Evaluating http://localhost:5555/node_modules/@vaadin/angular2-polymer/index.js
Evaluating http://localhost:5555/app/app.component.js
Evaluating http://localhost:5555/app/main.js
Error loading http://localhost:5555/app/main.js "Report this error at https://github.com/mgechev/angular2-seed/issues"当我删除app.component.ts的代码import { PolymerElement } from '@vaadin/angular2-polymer';行时,Angular2成功启动。
有没有人有办法帮我。
发布于 2016-10-24 17:35:14
您是否可以确保您的Angular 2版本与Angular2聚合物库兼容。如果是,请按照Vaadin文档https://vaadin.com/docs/-/part/elements/angular2-polymer/overview.html中的指南操作
https://stackoverflow.com/questions/39937015
复制相似问题