TritonDataCenter / node-assert-plus

Extra assertions on top of node's assert module
MIT License
122 stars 25 forks source link

Error when run with --'use-strict' mode #23

Closed takaaptech closed 8 years ago

takaaptech commented 8 years ago

Hi, I am running restify example in node version 5.0.0 and with --use-strict flag. How can i fix this error? Thank so much!

macbooks-MacBook-Pro-2:restify macbook$ node --'use-strict' main.js /Users/macbook/nodejs/restify/node_modules/assert-plus/assert.js:41 stackFunc = stackFunc || _assert.caller; ^

TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context. at _assert (/Users/macbook/nodejs/restify/node_modules/assert-plus/assert.js:41:49)

alextes commented 8 years ago

Just to provide some context. This means that using just node, without babel, and restify, is now not possible if you'd also like to not insert 'use strict' at the top of every file. Which to my surprise seems quite the rare use case.

plurry commented 8 years ago

This is fixed in the current version of the library, but Restify is still using an old version, so it's really a Restify problem. I think this issue can be closed.

alextes commented 8 years ago

Ah! Good to hear. Seems right to close this then. Long time ago but I still wonder.. Does everyone use babel? No one use restify? Or does everyone have no issue putting 'use strict' at the top of every file?