1

So I have been fiddling around with Netsuite and I want to know if it is possible to use Node.js or npm modules within a SuiteScript or Suitelet?

My goal is to use a few npm modules within Netsuite to interact with Amazon's MWS API.

1 Answer 1

5

No, it's a different Javascript engine. Rhino I believe.

You can use various JS libraries but Node modules are usually written with that engine in mind.

4
  • 2
    Correct. I believe NetSuite's server-side is running Rhino 1.7. You cannot run node-based code on NetSuite; however, you can write your code as, say, an npm module, and run npm scripts from the command line. I have done this in the past for unit testing, doc generation, eslint, etc. In order to actually run code in NetSuite, though, it must be in a plain .js file that NetSuite can interpret and load as a Library on your Script record. Sep 16, 2016 at 20:57
  • Thank you @TonyH and erictgrubaugh. Though I did read something about Node.js in SuiteCommerce. If you have a NetSuite account you can see that here. It talks about downloading Node.js to use for SuiteCommerce. Is that a completely different system?
    – VicDid
    Sep 17, 2016 at 5:51
  • What I have decided to do is use npm modules to interact with Netsuite but that won't do the whole job. Therefore a script will have to be made on Netsuite's side as well.
    – VicDid
    Sep 19, 2016 at 19:09
  • Yeah, that's typically the case. Its a bummer bc it's harder to do source control for the NS server side stuff
    – TonyH
    Sep 19, 2016 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.