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

Script.createContext is undefined in node 0.11.9 #3498

Closed
chrisyip opened this issue May 27, 2014 · 6 comments
Closed

Script.createContext is undefined in node 0.11.9 #3498

chrisyip opened this issue May 27, 2014 · 6 comments

Comments

@chrisyip
Copy link

I noticed that node had move Script.createContext to vm.createContext (http://nodejs.org/api/vm.html#vm_vm_createcontext_initsandbox).

I wonder if it's acceptable to use something like

var createContext = Script.createContext || vm.createContext;

to make it compatible with older and newer versions of node.

@chrisyip chrisyip changed the title Script.createContext is undefined in node 0.11.10 Script.createContext is undefined in node 0.11.9 May 27, 2014
@braco
Copy link

braco commented Nov 30, 2014

Confirming this still exists in coffee 1.8.0 with node 0.11.13

edit: @michaelficarra, sorry, but is there any plan to merge #3527 and close this issue out?

@braco braco mentioned this issue Dec 12, 2014
mbrio added a commit to mbrio/coffeescript that referenced this issue Jan 5, 2015
@mbrio
Copy link
Contributor

mbrio commented Jan 5, 2015

Just as an update, in-case some of my other changes were causing the previous patch to not be applied, I've re-forked coffeescript with the Script.createContext fixes and requested a new pull. Hopefully this will be merged soon.

@jashkenas
Copy link
Owner

@mbrio Is there a new pull we can take a look at?

@mbrio
Copy link
Contributor

mbrio commented Feb 12, 2015

@jashkenas I'll look into it right now, we've been using this fix for months now and haven't had any issues with it.

@mbrio
Copy link
Contributor

mbrio commented Feb 12, 2015

@jashkenas I just submitted a PR, the browser file didn't match the output of the compiled 1.9.0 source code. When I compiled it and overwrote the browser file supplied by coffee-script-source ruby gem, the error no longer occurred.

@GeoffreyBooth
Copy link
Collaborator

CoffeeScript 2 supports only Node 7+. If this issue only occurs in old versions of Node, I think we can stop worrying about it. Please comment if I’m wrong and I’ll reopen.

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

5 participants