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

Node package nats not working with nodeify #63

Open
GrempelsGabriel opened this issue Jul 24, 2019 · 1 comment
Open

Node package nats not working with nodeify #63

GrempelsGabriel opened this issue Jul 24, 2019 · 1 comment

Comments

@GrempelsGabriel
Copy link

Hi, i can't make npm package nats to work with nativescript nodeify. Thanks.

@GrempelsGabriel
Copy link
Author

How to reproduce the error:

  1. Create new project with nativescript and vue
  2. Add nativescript nodeify
  3. Add missing packages from node net and tls
  4. Add nativescript-randombytes

Make nativescript-randombytes accessible globally:

  1. Create new js file in project with this line:
    module.exports.randomBytes = require('nativescript-randombytes')
  2. Add to webpack.config.js in plugins configuration:
    new webpack.ProvidePlugin({
    crypto: resolve(__dirname, 'path to file.js')
    });
  3. 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.

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

1 participant