Skip to content

[node.js 6.x support] Native module sources is not supported #1733

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

Closed
mehfuzh opened this issue Apr 29, 2016 · 6 comments
Closed

[node.js 6.x support] Native module sources is not supported #1733

mehfuzh opened this issue Apr 29, 2016 · 6 comments
Labels
Milestone

Comments

@mehfuzh
Copy link

mehfuzh commented Apr 29, 2016

After updating to nativescript 2.0 when I try to install a plugin I am getting the following error:

(node:9070) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

@NickIliev
Copy link
Contributor

Hello @mehfuzh

Which version of node.js are you using?
This error is caused by some packages not supporting version 6 so if that is the case
you can try going back to 5.x

@NickIliev
Copy link
Contributor

I have installed the latest nodejs v.6.0.0 and the issue is confirmed.
Installing any plugin via tns plugin add xxx will return
Support for node.js 6.0.0 is not verified. This CLI might not install or run properly.

@mehfuzh As a solution I recommend to use the recommended Node.js version (4.4.x) or any version lower then 6 (I have tested successfully with 5.9.x) - you can use NVM to easily switch within Node.js versions

@hekigan
Copy link

hekigan commented May 18, 2016

I can confirm that.
I had to rollback to v5.11.1
Do we know specifically which plugin is causing that?

In my package.json I only have the following:

...
"nativescript-drop-down": "^1.2.5",
"nativescript-telerik-ui": "^1.1.0",
"tns-core-modules": "2.0.0"
...

@enchev
Copy link
Contributor

enchev commented Jun 6, 2016

Hey folks,

Right now node.js 6.x is still not supported and we will do our best to add support in the next release.

Hey @rosen-vladimirov,

Can you list here everything that needs to be precompiled with node.js 6 here?

Thanks

@enchev enchev changed the title Native module sources is not supported [node.js 6.x support] Native module sources is not supported Jun 6, 2016
@enchev enchev added this to the 2.1 milestone Jun 8, 2016
@geminiyellow
Copy link

👍

@rosen-vladimirov
Copy link
Contributor

Ooops, @enchev , sorry, I've somehow missed your comment.
When we want to support new Node.js version, there are a couple of C++ dependencies that we have to rebuild (and get the latest changes from their upstreams in case there are such changes). We've forked the C++ dependencies and modified them to use our own module called prebuilt. This allows us to distribute prebuilt binaries, so the end users will not need any tools when installing NativeScript CLI (rebuilding C++ dependencies requires Python, node-gyp, G++ or Visual Studio, based on the OS, etc.).
The dependencies that we have to rebuild are:

  • bufferutil
  • ffi
  • fibers
  • ref
  • utf-8-validate

Also we have to update our dependencies that depend on any of these packages, which are:

  • ios-sim-portable
  • NodObjC
  • ref-struct

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

No branches or pull requests

7 participants