Prepack: Fails to optimize with "not an object" TypeError

Created on 4 May 2017  路  2Comments  路  Source: facebook/prepack

Tried "prepacking" https://github.com/naikus/stage/blob/master/src/stage.js and got this error:

not an object
TypeError
    at repl:159:15
    at repl:155:13
    at repl:3:13
    at repl:2:1
question

Most helpful comment

Prepack is still in development and doesn't have knowledge about DOM. It doesn't know what's inside document and therefore doesn't know what to expect from document.createElement("div") which is on line 159 in your file.

I've tried adding DOM coverage myself using __assumeDataProperty() and __abstract() but no success. The only thing I can recommend is subscribe to #24 and wait.

All 2 comments

Prepack is still in development and doesn't have knowledge about DOM. It doesn't know what's inside document and therefore doesn't know what to expect from document.createElement("div") which is on line 159 in your file.

I've tried adding DOM coverage myself using __assumeDataProperty() and __abstract() but no success. The only thing I can recommend is subscribe to #24 and wait.

Closing as the question got answered.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jtenner picture jtenner  路  5Comments

aligoren picture aligoren  路  6Comments

kamranahmedse picture kamranahmedse  路  7Comments

bevacqua picture bevacqua  路  8Comments

MichaelBlume picture MichaelBlume  路  6Comments