Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object.defineProperty called on non-object #58

Closed
iamvdo opened this issue Jul 23, 2014 · 6 comments
Closed

Object.defineProperty called on non-object #58

iamvdo opened this issue Jul 23, 2014 · 6 comments

Comments

@iamvdo
Copy link
Contributor

iamvdo commented Jul 23, 2014

When using browserify to create standalone version of Pleeease, this error ocurrs with PostCSS 2.0. This works well with PostCSS 1.x.

Seems to be related to traceur, here is stacktrace:

   Stacktrace:
     TypeError: Object.defineProperty called on non-object
    at defineProperty (native)
    at defineProperty (pleeease\node_modules\postcss\node_modules\traceur\bin\traceur-runti
me.js:189:5)
    at polyfillObject (pleeease\standalone\pleeease-0.4.4.min.js:22360:5)
    at setupGlobals (pleeease\standalone\pleeease-0.4.4.min.js:22405:5)
    at rv (pleeease\standalone\pleeease-0.4.4.min.js:22407:3)
    at Object.<anonymous> (pleeease\standalone\pleeease-0.4.4.min.js:22427:3)
    at Object.Zbi7gb (pleeease\standalone\pleeease-0.4.4.min.js:24405:4)
    at s (pleeease\standalone\pleeease-0.4.4.min.js:1:608)
    at pleeease\standalone\pleeease-0.4.4.min.js:1:659
    at Object../lib/postcss (pleeease\standalone\pleeease-0.4.4.min.js:20212:1)

Any idea?

@ai
Copy link
Member

ai commented Jul 23, 2014

Yeap, I found this issue in AutoprefixerRails. I think it is a Browserify issue, because it try to detect global object by:

}).call(this,_dereq_("+xKvab"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

I just replace to:

}).call(this,_dereq_("+xKvab"),typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : {})

@ai
Copy link
Member

ai commented Jul 23, 2014

Maybe we should create issue in browserify repo? I create it today after 20 minutes.

@ai
Copy link
Member

ai commented Jul 23, 2014

@iamvdo I create issue: browserify/browserify#834

@iamvdo
Copy link
Contributor Author

iamvdo commented Jul 24, 2014

Fixed in browserify 5.0.3

@iamvdo iamvdo closed this as completed Jul 24, 2014
@ai
Copy link
Member

ai commented Jul 24, 2014

@iamvdo BTW, I plan to move to es6-transpiler. Most of work is finished. Maybe release PostCSS 2.1.0 on this week.

@ai
Copy link
Member

ai commented Jul 24, 2014

Second 2.1.0 feature will be: #59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants