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

Are NPM Packages supported? #77

Open
bogacg opened this issue May 18, 2020 · 4 comments
Open

Are NPM Packages supported? #77

bogacg opened this issue May 18, 2020 · 4 comments

Comments

@bogacg
Copy link

bogacg commented May 18, 2020

I'm getting error in form:

[*] Generating source file
[!] Require error :chalk

Chalk is an NPM package and my code is compiled from TS, which generated a line:
const chalk = require("chalk"); where the error occurs.

Is it even possible to use other NPM packages in NectarJs apps?

NectarJS ver. 0.5.31

@adrien-thierry
Copy link
Contributor

hi @bogacg ,
One of the goals of NectarJS is to support as many node modules as possible, and as many EcmaScript standards as possible,

We start to add a {nectar: {}} property in the package.json of module to say if it's compatible or not with NectarJS.

I will update this issue with the state of node modules support

@mzaini30
Copy link

I get this error too.

My code:

// Generated by CoffeeScript 2.5.1
var prompt;

prompt = require("prompt");

prompt.start();

prompt.get(["username"], function(error, hasil) {
  return console.log(`Username: ${hasil.username}`);
});

And the error:

[*] Generating source file
[!] Require error : prompt

I use this command:

nectar ask.js

@marcus-sa
Copy link

marcus-sa commented Jun 11, 2020

Most likely all NPM packages that use stdout, stdin or stderr will fail.

@adrien-thierry
Copy link
Contributor

@marcus-sa we integrated libuv with node env, so it's just a matter of time now to support NPM packages

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

No branches or pull requests

4 participants