I am wondering if it is possible to reference node modules in SuiteScript. For example, I am aware that I can create a third party library in the file cabinet and reference the moment.js file. However, is it possible to do an npm install moment on your suitecloud project and then have access moment in that script by simply importing it as you would in Node?
Is it possible to use Node.js in NetSuite/SuiteScript?
1.3k Views Asked by Matt Kraemer At
2
There are 2 best solutions below
1
felipechang
On
is it possible to do an npm install moment on your suitecloud project and then have access moment in that script by simply importing it as you would in Node?
Yes and no. What you could do in this case is to copy the required .js files along with the SuiteScript files when doing the deployment, having in mind that the SS files would be referencing the library using a relative path.
All of this could be programmed as a task in node (or maybe webpack), which would all execute in your machine, and then upload the results to NetSuite.
Related Questions in NETSUITE
- SuiteScript 1 Issue - Unable to populate Created From ID on another field
- Creating File in Drag and Drop Enabled File Cabinet in Netsuite using Rest API from Salesforce
- in netsuite advanced pdf im looking to put an asterisk next to my date in my customer statement if the date has elapsed
- Netsuite Saved Search does not export all results
- Iterating Over Object Keys in Freemarker Templates with SuiteScript 2.1 Custom Data Source
- NetSuite SSCC Generation
- SCA Kilimanjaro - how do we extend validation patterns
- python3 working on terminal but not on cron job
- In SuiteScript how to prevent search from prepending itemid with parent's itemid and a colon
- Void at Purchase Order Netsuite
- Can we check item sub-type in netsuite advanced pdf?
- NetSuite - Sales Order Item Fulfillment script not working
- Resetting NetSuite Sandbox to Default Without Production Data
- Invoice line item addition through api
- How to source invoice record's line item details on customer payment advanced pdf template?
Related Questions in SUITESCRIPT
- SuiteScript 1 Issue - Unable to populate Created From ID on another field
- Iterating Over Object Keys in Freemarker Templates with SuiteScript 2.1 Custom Data Source
- NetSuite SSCC Generation
- Can we check item sub-type in netsuite advanced pdf?
- Right now on click of a button a modal is opening but now on click of button I want to open a modal and also Submit values for the form
- How to attach invoice pdf on invoice record in communication tab using suitescript 2.0?
- Can I use sass instead of node-sass in suiteCommerce project?
- NetSuite SuiteScript FOR loop and IF statement Confusion
- Cannot retrieve data from PO sublist into Inbound shipment sublist
- Netsuite Scheduled script stuck on pending status
- How to set tax code on Vendor Credits expense item using NetSuite SuiteTalk SOAP api or SuiteScripts?
- HTTP Post From NetSuite SuiteScript To Boomi Endpoint
- How to reflect TEXT AREA / LONG TEXT field values in formatted way in PDF suitelets
- How to Transform a Sales Order to Item Fulfillment with Inventory Detail via SuiteScript?
- How to call to a javascript file that in bundle in Netsuite?
Related Questions in SUITESCRIPT2.0
- SuiteScript 1 Issue - Unable to populate Created From ID on another field
- In SuiteScript how to prevent search from prepending itemid with parent's itemid and a colon
- NetSuite - Sales Order Item Fulfillment script not working
- How to source invoice record's line item details on customer payment advanced pdf template?
- How to attach invoice pdf on invoice record in communication tab using suitescript 2.0?
- NetSuite SuiteScript FOR loop and IF statement Confusion
- Netsuite Suitescript 2.0 Inventory Transfer on Lot items
- Cannot retrieve data from PO sublist into Inbound shipment sublist
- Netsuite Scheduled script stuck on pending status
- customRecord not defined SuiteScript 2.0 UE
- How to reflect TEXT AREA / LONG TEXT field values in formatted way in PDF suitelets
- How to Transform a Sales Order to Item Fulfillment with Inventory Detail via SuiteScript?
- SuiteScript 2.0 Suitelet - Search Results
- How do I get a relative path to a css file for a suitelet's client script?
- How to set field value in another record in NetSuite using SuiteScript
Related Questions in SUITECLOUD
- NetSuite Eclipse Upload of scripts
- TypeError: Cannot read property 'getValue' of null at Object.onAction
- Netsuite - SuiteCloud Development Framework - GitHub Integration - CI/CD
- There is no JAR file in your CLI for Node.Js. SuiteCloud CLI
- Create a custom record type in NetSuite via SuiteScript
- Is it possible to use Node.js in NetSuite/SuiteScript?
- Netsuite - Custom List related to a object field
- Netsuite: Add new value in custom list via REST webservice
- Eclipse error: org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:445)
- Netsuite SDF Deploy Error - Gateway Time-Out
- How can we mimic "Next Bill" button functionality using the Suite script?
- netsuite Arabic language localization
- In Eclipse, cursor keeps jumping into the Console after clicking Ctrl+S
- Can we Access Oracle NetSuite old cloud version?
- Is there a modern community to share knowledge and best-practicies of those who work with SuiteScript 2.0?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Actually you cannot use Node.js inside suite script. But you can trigger scripts from Node.js. Example if you want to create a record from a json file, you can trigger node.js to pass the json to a Map/Reduce or RestLet script.