biotope / biotope-element

A web component
https://element.biotope.sh
15 stars 5 forks source link

Error after uptdate 1.8.0 #34

Closed dweiger closed 6 years ago

dweiger commented 6 years ago

Since I updated to version 1.8.0 i get the following Error:

VM319:156 Uncaught TypeError: Object prototype may only be an Object or null: undefined at Function.create () at _inheritsLoose (:156:77) at :181:3 at Object../node_modules/@biotope/element/lib/index.js (:271:2) at webpack_require (:20:30) at Module../src/components/listUnordered/ts/listUnordered.ts (:3628:74) at webpack_require (:20:30) at ./node_modules/@biotope/element/lib/attribute-name-mapper.js.Object.defineProperty.value (:84:18) at :87:10 at DOMEval (jquery.js:111)

is there anything else I have to change for that update. In the Boilerplate for example?

timomayer commented 6 years ago

@tiagomapmarques can you look into it please?

jurekbarth commented 6 years ago

@tiagomapmarques is that fixed in 1.8.1?

tiagomapmarques commented 6 years ago

v1.8.1 was a bugfix for a previous bug that was still happening on some circumstances. Nothing to do with this ticket.

My best guess is that this is a "_attributes" name left in the code. That should be changed to "attributes".

tiagomapmarques commented 6 years ago

@dweiger @jurekbarth @SheepFromHeaven @timomayer The bug was switching from esnext to commonjs. This causes the compiled code to be exported differently and thus some projects might have problems importing and using the code.

As for the solution, we should review our typings and exports to make sure we are exporting the Component class correctly on commonjs. IMO we should not revert to esnext.

To verify that this is really the bug, @dweiger can you clone the biotope-element repo, change the export type in tsconfig.json to esnext, compile, link it to your project and then check if the error is fixed?

EDIT: Problem is in fact on that file but on a different section. It was the added include files section that is causing the issue. Will remove in a PR.

FINAL EDIT: it's not the export of biotope-element - HyperHTML changed its export to default

37 will be updated accordingly.

dweiger commented 6 years ago

@tiagomapmarques Sadly that does not solve the Problem.