-
Notifications
You must be signed in to change notification settings - Fork 45
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
problem with harmony-reflect #39
Comments
Same issue here. Meanwhile we switched our package.json from
to
|
It is my fault, I'm sorry. The new release uses harmony proxies to solve some issues (v8 has not still included standard ES6 proxies, they will very soon) you can add the flag --harmony-proxies to your init script, or use the previous version. I will take a look to this very soon |
So, short version There was a major issue causing the middleware not to execute, making this library useless for many of its potential use cases. I fixed it with this commit, which caused the error you are experiencing when I merged this branch. There was another option which was not functional (the reason why is included on the comments of the discarded PR). The proper solution uses proxies. Unfortunately, v8 has not still fully implemented them. There is work in progress, and they will very soon include them. Meanwhile, the ES6 proxy interface is available using harmony-reflect, a façade to ES6 using ES5 I certainly released the new version too soon, as @efueyo said, you can go on using the previous release (0.2.0), or add the --harmony_proxies flag to your start command as it is done here, my personal advice is to do the latest, since this will allow you to use pre middleware. As soon as v8 includes proxies, this will not be a problem anymore. I'll anyway update the docs and eventually allow to run the library without proxies (old behaviour), which will mean that not using the flag will result on the middleware not working. |
Please consider reversing this. It appears to be impossible to pass "--harmony_proxies" to node via PM2. In addition, V8 is very much a javascript staple - if the library uses features unsupported by V8, it becomes useless to an awful lot of people. |
Hi
I have mongoose-schema-extend installed with a dependency to [email protected]
[email protected]
└── [email protected]
this gives the following error
/home/ubuntu/git/nsoc-mwc/node_modules/mongoose-schema-extend/node_modules/harmony-reflect/reflect.js:2049
throw new Error("proxies not supported on this platform. On v8/node/iojs, make sure to pass the --harmony_proxies flag");
^
Error: proxies not supported on this platform. On v8/node/iojs, make sure to pass the --harmony_proxies flag
at new global.Proxy (/home/ubuntu/git/nsoc-mwc/node_modules/mongoose-schema-extend/node_modules/harmony-reflect/reflect.js:2049:13)
at Schema.extend.options as extend
at Object. (/home/ubuntu/git/nsoc-mwc/models/country.js:8:35)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/home/ubuntu/git/nsoc-mwc/routes/ar_country.js:3:15)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
reverting to a previous mongoose-schema-extend and harmony-reflect version fixes the problem
"mongoose-schema-extend": "0.2.0",
"harmony-reflect": "1.4.1",
The text was updated successfully, but these errors were encountered: