nativescript-nodeify
nativescript-nodeify copied to clipboard
Node package nats not working with nodeify
Hi, i can't make npm package nats to work with nativescript nodeify. Thanks.
How to reproduce the error:
- Create new project with nativescript and vue
- Add nativescript nodeify
- Add missing packages from node net and tls
- Add nativescript-randombytes
Make nativescript-randombytes accessible globally:
- Create new js file in project with this line: module.exports.randomBytes = require('nativescript-randombytes')
- Add to webpack.config.js in plugins configuration: new webpack.ProvidePlugin({ crypto: resolve(__dirname, 'path to file.js') });
- Add to webpack.config.js in resolve.alias configuration: 'crypto': resolve(__dirname, 'path to file.js')
Add the following under node config options in webpack.config.js: "net": 'mock'
Add the following under resolve config options in webpack.config.js: aliasFields: ['browser']
Now i get the following error: Cannot read property 'SetNoDelay' of undefined
I've tried to clean project platform/android folder, hooks and node_modules but i get the same error. Thanks.