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

NativeScript-Vue support

Open TheTrunk opened this issue 5 years ago • 6 comments

I am creating NativeScript-Vue application and I am struggeling to use nativescript-nodeify plugin. Is there a documented way of using it in nativescript-vue template?

TheTrunk avatar Aug 25 '18 17:08 TheTrunk

No solution so far? I stumble on: Error is: Cannot find module '[...]\platforms\android\app\src\main\assets\app\tns_modules\nativescript-nodeify\patch-npm-packages.js'.

https://kion.me/using-nativescript-nodeify-with-nativescript-vue/ Found this article. Haven't tried it myself tho.

Edit: Add article

Eligioo avatar Feb 07 '19 12:02 Eligioo

@Eligioo DId you manage to solve this?

racknoris avatar Apr 14 '19 20:04 racknoris

@racknoris It's been 2 months ago so I don't really remember correctly anymore. But I think I did solve it in the end by copying the not-found module(s) from the source folder to the actual target folder. It's deep nested somewhere in the Gradle folder. It's a folder that contains all the other modules that are actually copied correctly for transferring to the phone.

Eligioo avatar Apr 15 '19 00:04 Eligioo

I copied the nativescript-nodeify from my node_modules to platforms\android\app\src\main\assets\app, and the compilation worked but I encountered some weird runtime errors I haven't seen before (using angular btw)

racknoris avatar Apr 15 '19 07:04 racknoris

The problem is related to webpack. Please see this issue #35

There is a workaround here: https://github.com/EddyVerbruggen/nativescript-nodeify/issues/35#issuecomment-421807752

msaelices avatar Jun 17 '19 12:06 msaelices

I have a same (???) issue on my nativescript-vue project :sob: (https://github.com/EddyVerbruggen/nativescript-nodeify/issues/35#issuecomment-421807752 workaround couldn't fix this...)

$ tns plugin add nativescript-nodeify
$ npm install aws-sdk node-uuid @types/node --save
$ tns run android --bundle

...

ERROR in ../node_modules/aws-sdk/lib/credentials/process_credentials.js
Module not found: Error: Can't resolve 'child_process' in '/path/to/weekend-school-for-kids/node_modules/aws-sdk/lib/credentials'
 @ ../node_modules/aws-sdk/lib/credentials/process_credentials.js 3:11-35
 @ ../node_modules/aws-sdk/lib/node_loader.js
 @ ../node_modules/aws-sdk/lib/aws.js
 @ ./control/Instructions.ts
 @ ../node_modules/ts-loader??ref--3!../node_modules/vue-loader/lib??vue-loader-options!./components/App/NotingScreen.vue?vue&type=script&lang=ts&
 @ ./components/App/NotingScreen.vue?vue&type=script&lang=ts&
 @ ./components/App/NotingScreen.vue
 @ ../node_modules/ts-loader??ref--3!../node_modules/vue-loader/lib??vue-loader-options!./components/App.vue?vue&type=script&lang=ts&
 @ ./components/App.vue?vue&type=script&lang=ts&
 @ ./components/App.vue
 @ ./main.ts

ERROR in ../node_modules/aws-sdk/lib/publisher/index.js
Module not found: Error: Can't resolve 'dgram' in '/path/to/weekend-school-for-kids/node_modules/aws-sdk/lib/publisher'
 @ ../node_modules/aws-sdk/lib/publisher/index.js 3:12-28
 @ ../node_modules/aws-sdk/lib/node_loader.js
 @ ../node_modules/aws-sdk/lib/aws.js
 @ ./control/Instructions.ts
 @ ../node_modules/ts-loader??ref--3!../node_modules/vue-loader/lib??vue-loader-options!./components/App/NotingScreen.vue?vue&type=script&lang=ts&
 @ ./components/App/NotingScreen.vue?vue&type=script&lang=ts&
 @ ./components/App/NotingScreen.vue
 @ ../node_modules/ts-loader??ref--3!../node_modules/vue-loader/lib??vue-loader-options!./components/App.vue?vue&type=script&lang=ts&
 @ ./components/App.vue?vue&type=script&lang=ts&
 @ ./components/App.vue
 @ ./main.ts

ERROR in ../node_modules/xml2js/lib/parser.js
Module not found: Error: Can't resolve 'timers' in '/path/to/weekend-school-for-kids/node_modules/xml2js/lib'
 @ ../node_modules/xml2js/lib/parser.js 38:17-34
 @ ../node_modules/xml2js/lib/xml2js.js
 @ ../node_modules/aws-sdk/lib/xml/node_parser.js
 @ ../node_modules/aws-sdk/lib/node_loader.js
 @ ../node_modules/aws-sdk/lib/aws.js
 @ ./control/Instructions.ts
 @ ../node_modules/ts-loader??ref--3!../node_modules/vue-loader/lib??vue-loader-options!./components/App/NotingScreen.vue?vue&type=script&lang=ts&
 @ ./components/App/NotingScreen.vue?vue&type=script&lang=ts&
 @ ./components/App/NotingScreen.vue
 @ ../node_modules/ts-loader??ref--3!../node_modules/vue-loader/lib??vue-loader-options!./components/App.vue?vue&type=script&lang=ts&
 @ ./components/App.vue?vue&type=script&lang=ts&
 @ ./components/App.vue
 @ ./main.ts
Webpack compilation complete. Watching for file changes.
Webpack build done!
Copying template files...
Platform android successfully added. v5.0.0
Preparing project...

...

aiya000 avatar Jun 18 '19 02:06 aiya000