nativescript-nodeify icon indicating copy to clipboard operation
nativescript-nodeify copied to clipboard

Add support for nativescript 6.0

Open amlibtest opened this issue 5 years ago • 5 comments

With nativescript 6.0, service $platformsData has been renamed to $platformsDataService and hookArgs structure has also changed, for example.

https://www.nativescript.org/blog/migrating-cli-hooks-to-nativescript-6.0

amlibtest avatar Jul 22 '19 18:07 amlibtest

I tried to hack my way to make it work in NativeScript 6, but ran into a few walls. Anyone have a workaround that actually works ?

darxmac avatar Aug 23 '19 12:08 darxmac

@EddyVerbruggen any news on this?

dosomder avatar Nov 04 '19 06:11 dosomder

Not by me yet, but it's not too hard to adjust those hooks (a lot of plugins had to change their hook code), and a PR is more than welcome considering my endless pile of other stuff to work on.

EddyVerbruggen avatar Nov 04 '19 08:11 EddyVerbruggen

I did patch the hook but then I get the error

Cannot find module 'C:\Users\hue\Documents\GitHub\hue\platforms\android\app\src\main\assets\app\tns_modules\nativescript-nodeify\patch-npm-packages.js'

The folder tns_modules does not exist in this path.

dosomder avatar Nov 04 '19 11:11 dosomder

I am seeing the same error that @dosomder is seeing.

This is the line in patch-platforms.js that is failing.

var patchNpmPackage = require(patchNpmPackageDir);

The script expects to find patch-npm-packages.js under the tns_modules/nativescript-nodeify directory. The file exists in the nativescript-nodeify directory under the project's root node_modules, however none of the node dependencies are being copied to the tns_modules directory. Did something change in NS6 such that the dependencies are not staged in tns_modules during the prepare phase?

This is related to supporting webpack which is described in Issue #35

jedatu avatar Nov 11 '19 01:11 jedatu