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

Incompatibility with Node < v8.5.0 #27

Closed
xtuc opened this issue Mar 2, 2018 · 1 comment
Closed

Incompatibility with Node < v8.5.0 #27

xtuc opened this issue Mar 2, 2018 · 1 comment

Comments

@xtuc
Copy link

xtuc commented Mar 2, 2018

I got the following error while trying to install the package:

/foo/node_modules/graphql_ppx/copyPlatformBinaryInPlace.js:41
    fs.copyFileSync(filename, 'ppx');
       ^
TypeError: fs.copyFileSync is not a function
    at Object.<anonymous> (/foo/node_modules/graphql_ppx/copyPlatformBinaryInPlace.js:41:8)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:383:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:496:3

I had Node v6.11.4, which doesn't support fs.copyFileSync (Added in: v8.5.0).

fs.copyFileSync(filename, 'ppx');

Since the error message isn't really helpful, I would suggest to either check the Node version or use some kind of polyfill.

@thangngoc89
Copy link

@xtuc @mhallin said he would be happy to accept PRs that add copyFileSync polyfill

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